0
votes

I am trying to deploy Symfony2 application to RHEL7 by using Capifony. I set up the shared directories: app/cache/, app/logs/ .

There are two users: webdev and apache. Webdev is a command line user and apache is web server user. During the deploy process, webdev user needs rwx access to all shared files and directories. If I grant that manually by using chown:

# chown -R webdev:webdev app/cache
# chown -R webdev:webdev app/logs

the deploy process is successful.

However, the web application does not work due to permissions. Apache user does not have access to those directories just after deploy. If I change the ownership again:

# chown -R apache:apache app/cache
# chown -R apache:apache app/logs

web application works. But then it's not possible to deploy the new release because webdev user lost access to those directories.

There are instructions how to fix this issue using ACLs in Symfony documentation:

I applied that numerous times on Ubuntu with success. But on Red Hat it does not work.

[RuntimeException]
*   Unable to write in the logs directory (/wwwserver/vhosts/mydomain.com/releases/20160211104717/app/logs)  
[RuntimeException]
*   Unable to write in the cache directory (/wwwserver/vhosts/mydomain.com/releases/20160211104717/app/cache

Long story short:

  • How on Earth would that be possible to grant access to certain directories and files for two different users, at the same time, on Red Hat Enterprise Linux 7 ?
1

1 Answers

0
votes

You'll need to add both users to a common group and give the common group write permissions to the app/cache and app/logs directories.