Page 1 of 1

Who is SUPPOSED to be the owner of /var/www ?

Posted: 2018/07/24 12:26:11
by lightman47
On my system it is apache, though as you progress further into the sub directories it changes to root. I suspect it should be root, and that this happened several years ago with an errant command (in the wrong directory).

It's my only web server so I haven't another with which to check.

Thank you.

Re: Who is SUPPOSED to be the owner of /var/www ?

Posted: 2018/07/24 12:35:20
by TrevorH
So /var/www is owned the httpd package and you can see what files have changed their permissions/ownership by using rpm -V httpd. You can use rpm --setperms|--setugids to reset the permissions on all files/directories owned by an rpm.

Mine is:

Code: Select all

drwxr-xr-x. 3 root root 4096 Jun 23 21:05 .

Re: Who is SUPPOSED to be the owner of /var/www ?

Posted: 2018/07/24 12:43:26
by lightman47
I will change it back to root. I have a special group assigned that contains myself and my son with 'rwx' which I need to remain, so I don't want to change that.

Thanks - saving this for future reference.