In Cpanel, when a user is created, it always creates the “public_html” directory with ownership user : and group:
nobody. However, if suexec is enabled it requires the ownership of “public_html” directory to be user : and
group: . This is not done when a account is created via WHM. It creates with the default. “public_html” : nobody
Here are two scripts which changes the permission.
Script 1
cat changeperm
echo “Enter the user:”
read user
chown $user.$user /home/$user/public_html
chmod 755 /home/$user/public_html
cat changepermall
for user in `cat /etc/trueuserdomains | cut -d : -f 2`
do
chown $user.$user /home/$user/public_html
chmod 755 /home/$user/public_html
done
The script “changeperm” when executed will prompt for the username for which the permissions will be set (single
account). The second script “changepermall” will change the permissions of all t
In Cpanel, when a user is created, it always creates the “public_html” directory with ownership user : and group: nobody. However, if suexec is enabled it requires the ownership of “public_html” directory to be user : and group: . This is not done when a account is created via WHM. It creates with the default. “public_html” : nobody
Here are two scripts which changes the permission.
Script 1
cat changeperm
echo “Enter the user:”
read user
chown $user.$user /home/$user/public_html
chmod 755 /home/$user/public_html
cat changepermall
for user in `cat /etc/trueuserdomains | cut -d : -f 2`
do
chown $user.$user /home/$user/public_html
chmod 755 /home/$user/public_html
The script “changeperm” when executed will prompt for the username for which the permissions will be set (single account). The second script “changepermall” will change the permissions of all the users.
?»??_?????^?????_?????~??V?_????? - ?Ú?????«?
??g?_g????^?????_g????~????_g???? - ?????????
No comments:
Post a Comment