New users' directories owned by root

Posted by dotancohen on Server Fault See other posts from Server Fault or by dotancohen
Published on 2012-09-02T17:59:18Z Indexed on 2012/09/03 9:40 UTC
Read the original article Hit count: 226

Filed under:
|
|

On a CentOS server running Plesk, new users are added for each new domain. The users' home directories are in /var/www/vhosts/. New users' home directories are owned by root, and need to have an admin with root access come in and chown them:

dotan@sh2:~$ echo $HOME
/var/www/vhosts/someDomain.com
dotan@sh2:~$ pwd
/var/www/vhosts/someDomain.com
dotan@sh2:~$ touch testFile
touch: cannot touch `testFile': Permission denied
dotan@sh2:~$ ls -la ../ | grep someDomain
drwxr-xr-x 13 root root 4096 2012-08-07 19:47 someDomain.com
dotan@sh2:~$ whoami
dotan
dotan@sh2:~$ chown dotan /var/www/vhosts/someDomain.com
chown: changing ownership of `/var/www/vhosts/someDomain.com': Operation not permitted
dotan@sh2:~$ 

Why might the new users' directories be owned by root, and how might we fix this?

Thanks.

© Server Fault or respective owner

Related posts about centos

Related posts about plesk