I have been setting up a production environment for Symfony framework application on Red Hat Enterprise 7 Linux.
I have an issue with enabling writing permissions to certain directories.
In order to enable write access to some directories, I have been doing the following:
# semanage fcontext -a -t httpd_sys_rw_content_t "/wwwserver/vhosts/thewebsite.com/shared/app/cache(/.*)?"
# restorecon -R -v /wwwserver/vhosts/thewebsite.com/shared/app/cache
# chown apache:symfonyusers /wwwserver/vhosts/thewebsite.com/shared/app/cache
It works if only one user should be able to write to the directory and subdirectories. However, the requirement is to have write access for Apache user, and command line user at the same time.
So I created a new group, named it 'symfonyusers' and added both 'apache' and 'webdev' users to the same group.
I also tried this:
# chmod g+s /wwwserver/vhosts/thewebsite.com/shared/app/cache
It does not work, the users are in the same group, but both of them can not write to the directory at the same time.
How to set this up properly?
The system does not have ACL installed and that is not an option.
Thank you