Confusion on file and directory permissions
by bulgin from LinuxQuestions.org on (#4ZKV9)
Hello.
I am running software on a server which states that the file permissions should be:
cd /var/www/example.com/domain
chown -R $USER:www-data .
However, my server has no www-data account. httpd in centos runs as nobody.
As well. $USER could be anything from root to any other logged in user depending on how they are accessing the server - for example, when I login into the server via ssh I'm root, so in that case the user would root. I can also login as a user with name this-is-my-name in which case the $USER would be this-is-my-name.
So what's the story?


I am running software on a server which states that the file permissions should be:
cd /var/www/example.com/domain
chown -R $USER:www-data .
However, my server has no www-data account. httpd in centos runs as nobody.
As well. $USER could be anything from root to any other logged in user depending on how they are accessing the server - for example, when I login into the server via ssh I'm root, so in that case the user would root. I can also login as a user with name this-is-my-name in which case the $USER would be this-is-my-name.
So what's the story?