adding to linux add user script?

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
I'm setting up a RedHat 6.2 machine that will be serving up user's webpages in part. I added a public_html directory in /etc/skel/ so when adduser is used that is created in their home directory. Each new user that is added though needs the permissions of the /home/user/public_html directory changed by doing:
chmod 701 /home/username
chmod 751 /home/username/public_html
Is there a way I can make those permissions be set to that directory to each new user? Setting them like that in skel doesn't make the permissions carry over it seems.
 

RGN

Diamond Member
Feb 24, 2000
6,623
6
81
Make a group (like html) and give your users rights to that group, and give the group rights to the directory.