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.

  • Hi, all. Created a new domain and copied to permission. Basically username:psacln. – user48233 Feb 24 '10 at 18:52
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)

  • This is easier than the equivalent using chmod since files and directories don't need to be treated differently. – Michael Mior Feb 24 '10 at 18:35
  • I did try that already and get invalid group error. – user48233 Feb 24 '10 at 18:35
  • Hi, all. Created a new domain and copied to permission. Basically username:psacln. – user48233 Feb 24 '10 at 18:52
  • I take it this means your problem is resolved? :) – Michael Mior Feb 24 '10 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). – Michael Mior Jun 15 '10 at 2:28

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy