On 09/06/2016 01:25 PM, Mike Wright wrote:
On 09/06/2016 01:11 PM, Alex wrote:
> Hi,
>
> I've set up a virtual host for a joomla website and having some
> permissions problems. I've seen numerous configurations online about
> how to set umask for the apache user, but none have worked, including
> creating a systemd file
> (/etc/systemd/system/multi-user.target.wants/httpd.service) with the
> following:
> Umask=0006 <<<<<<<< ?
That comes out to 771 : rwxrwx--x. Maybe 0002 ?
Apache normally runs as apache:apache. Joomla is just a PHP application
running under Apache, so if you're using mod_php, Apache is what will
actually be doing the reading and writing of the files and the
apache:apache user should have rwx access to the entire tree.
If you're running PHP-FPM, then the user that PHP is running as should
have own the tree and have rwx access to it, while Apache should have
at least r-x access to the tree. You could do that by putting the PHP
user in the apache group, giving ownership of the tree to the PHP user
and giving group r-x privileges:
useradd -d /path/to/website -g apache phpuser
cd /path/to/website
chown -R phpuser:apache *
chmod -R 750 *
or something like that. Also watch out for selinux denials. "Here be
dragons!"
----------------------------------------------------------------------
- Rick Stevens, Systems Engineer, AllDigital ricks(a)alldigital.com -
- AIM/Skype: therps2 ICQ: 226437340 Yahoo: origrps2 -
- -
- Hard work has a future payoff. Laziness pays off now. -
----------------------------------------------------------------------