Re: [CentOS] Web server files ownership?

2017-07-07 Thread Nicolas Kovacs
Le 07/07/2017 à 12:53, Pete Biggs a écrit : > There's lots of pages out there about hardening Apache and what file > ownership and permissions the site should have. Everyone has their > opinion and the defaults for different distros varies. But the > underlying idea is that the web server files

Re: [CentOS] Web server files ownership?

2017-07-07 Thread Bill Gee
On Friday, July 7, 2017 6:45:48 AM CDT Pete Biggs wrote: > > File permissions are 574. Note that owners are NOT required to have > > higher > > permissions than groups! > > > > find /var/www/html -type f -exec chmod 574 {} \; > > Normal files really shouldn't have their execute bit set. There

Re: [CentOS] Web server files ownership?

2017-07-07 Thread Pete Biggs
On Fri, 2017-07-07 at 12:56 +0100, John Hodrien wrote: > On Fri, 7 Jul 2017, Pete Biggs wrote: > > > Not necessarily. In order to change permissions on a file you need to > > have write access to the directory (i.e. the special file in the parent > > directory that describes the files present in

Re: [CentOS] Web server files ownership?

2017-07-07 Thread John Hodrien
On Fri, 7 Jul 2017, Pete Biggs wrote: Not necessarily. In order to change permissions on a file you need to have write access to the directory (i.e. the special file in the parent directory that describes the files present in the directory). To delete, yes, but to chmod? It makes no sense

Re: [CentOS] Web server files ownership?

2017-07-07 Thread Pete Biggs
> > File permissions are 574. Note that owners are NOT required to have higher > permissions than groups! > > find /var/www/html -type f -exec chmod 574 {} \; Normal files really shouldn't have their execute bit set. There is no need to (since they aren't going to be executed) and just sets

Re: [CentOS] Web server files ownership?

2017-07-07 Thread Pete Biggs
On Fri, 2017-07-07 at 12:31 +0100, John Hodrien wrote: > On Fri, 7 Jul 2017, Bill Gee wrote: > > > File permissions are 574. Note that owners are NOT required to have higher > > permissions than groups! > > But the owner can change the permissions, no? Not necessarily. In order to change

Re: [CentOS] Web server files ownership?

2017-07-07 Thread John Hodrien
On Fri, 7 Jul 2017, Bill Gee wrote: File permissions are 574. Note that owners are NOT required to have higher permissions than groups! But the owner can change the permissions, no? 574 is a properly perculiar permission to set. jh ___ CentOS

Re: [CentOS] Web server files ownership?

2017-07-07 Thread Bill Gee
On Friday, July 7, 2017 5:25:29 AM CDT Nicolas Kovacs wrote: > Hi, > > I have a series of websites hosted on two CentOS 7 servers, using Apache > virtual hosts. One of these servers is a "sandbox" machine, to test > things and to fiddle around. > > Since Apache is running as system user

Re: [CentOS] Web server files ownership?

2017-07-07 Thread Pete Biggs
> > Since Apache is running as system user 'apache' and system group > 'apache', I thought it sensible that hosted files be owned by that process. > > # ls -l /var/www/html/ > total 24 > drwxr-x---. 3 apache apache 4096 6 juil. 09:37 default > drwxr-x---. 3 apache apache 4096 6 juil. 10:01

[CentOS] Web server files ownership?

2017-07-07 Thread Nicolas Kovacs
Hi, I have a series of websites hosted on two CentOS 7 servers, using Apache virtual hosts. One of these servers is a "sandbox" machine, to test things and to fiddle around. On the sandbox server, I have a few dummy websites I'm hosting. # ls /var/www/html/ default phpinfo slackbox-mail