0

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

  • 1
    Set up ACLs. If it's "not an option" then you need to make it an option. – Michael Hampton Jan 22 '16 at 19:14
  • Does that mean that there is no other solution? I mean, I am grateful for any useful info, and since I am not the one who makes decisions about what to install to corporate server I would need a good reason to ask for ACL to be installed. – Đuro Mandinić Jan 22 '16 at 19:16
  • 1
    Simple, it's the only thing that will actually do what you want. And I'm quite surprised that someone allowed the server to be set up without it. ACLs are a very useful security feature, after all. – Michael Hampton Jan 22 '16 at 19:45

0 Answers0