Hello All,
All the permissions of directories in /home partition are chmod to 711, owner and group as root. How can I fix the owner, group and permissions according to the user. Please help.
Thank you,
Hello All,
All the permissions of directories in /home partition are chmod to 711, owner and group as root. How can I fix the owner, group and permissions according to the user. Please help.
Thank you,
rh_linuxion
It is very simple to be Happy but it is very difficult to be Simple.
711 is correct just the ownership needs to be corrected. You can do this running the following commands in shell as root;
for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done
for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done
for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done
Regards,
David
Forum Moderator
Thank you very much. That help me out.
rh_linuxion
It is very simple to be Happy but it is very difficult to be Simple.
to new servers via WHM and the permissions were a MESS. Thanks. I want to be you when I grow up.
Diana Ward
http://aqualityhost.com
Sanity calms, but madness is more interesting.
<cite>-- John Russell </cite>
That's why I'm a Web designer/host."
<cite>-- Diana Ward</cite>
Originally Posted by dianaward
The sex change may not be worth the hassle.![]()
Regards,
David
Forum Moderator
Must we write like this?
do chown -R $CPAccess:$CPAccess /home/$CPAccess
serdar guney
Use the commands exactly as they are written.
Regards,
David
Forum Moderator
ide0(3,3): warning, user block quota exceeded
--
it is giving this error.
serdar guney
?? Are you logged in as root??
If logged in as root, try logging out and back in.
Regards,
David
Forum Moderator
I get :
-bash: syntax error near unexpected token `do'
What was the command you typed? They MUST be EXACTLY as shown below.
Code:for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done
Regards,
David
Forum Moderator
This has corrected the errors. Thank you for your help :-)
david... for those of us with just enough knowledge to be dangerous, would you have the patience to explain those command? I do understand the basics in each string, but I'm not sure about the structure of each complete command line... maybe I'll guess...
for CPAccess in `ls -A /var/cpanel/users`;
... is this part starting a foreach type loop and assigning the var name CPAccess to represent the name of each user in /var/cpanel/users ?
do chown -R $CPAccess:$CPAccess /home/$CPAccess;
... and then this part is chowning each corresponding user dir it finds
done
... and then this part closes the foreach looping when it runs out of matches?
cool![]()
Aces!! Dead on. That's exactly what is does.![]()
Regards,
David
Forum Moderator
By George, I think I'm getting it!
That's pretty elegant.![]()