1

I have just correct my file permissions using: Need to fix file permissions in a user's home directory

Looking for the same commands and explanation to correct ownership of files and directories in the user directory (/var/www/vhosts/domain.com/*) for ownership of files.

I am running CentOS and Plesk Panel and currently logged in as root via ssh.

1
  • Hi, all. Created a new domain and copied to permission. Basically username:psacln.
    – user48233
    Feb 24, 2010 at 18:52

1 Answer 1

2

chown has a recursive option. So you can just do chown -R user:user /var/www/vhosts/domain.com/* (where user is the user you would like to change ownership to)

7
  • This is easier than the equivalent using chmod since files and directories don't need to be treated differently. Feb 24, 2010 at 18:35
  • I did try that already and get invalid group error.
    – user48233
    Feb 24, 2010 at 18:35
  • Hi, all. Created a new domain and copied to permission. Basically username:psacln.
    – user48233
    Feb 24, 2010 at 18:52
  • I take it this means your problem is resolved? :) Feb 24, 2010 at 22:38
  • Just a note that the invalid group will happen if a group does not exist with the name of the user. In that case, specify the default group of the user after the colon (or whatever group you would like the files to belong to). Jun 15, 2010 at 2:28

You must log in to answer this question.