GithubHelp home page GithubHelp logo

Cache permissions issue about symfony HOT 3 CLOSED

capistrano avatar capistrano commented on August 18, 2024
Cache permissions issue

from symfony.

Comments (3)

pstephenson02 avatar pstephenson02 commented on August 18, 2024

Ok, some more information here.
While setfacl is honestly a bit of voodoo to me, it does appear that despite adding the flag:

set :webserver_user, "apache"

in my deploy.rb, the setfacl command run does not include web server user in the command:

INFO [041334b0] Running /usr/bin/env setfacl -Rm u:cdpaccess:rwx /var/www/cdpaccess/shared/app/logs /var/www/cdpaccess/releases/20150618175416/app/cache /var/www/cdpaccess/releases/20150618175416/app/var /var/www/cdpaccess/shared/web/uploads as [email protected]
DEBUG [041334b0] Command: ( SYMFONY_ENV=prod /usr/bin/env setfacl -Rm u:cdpaccess:rwx /var/www/cdpaccess/shared/app/logs /var/www/cdpaccess/releases/20150618175416/app/cache /var/www/cdpaccess/releases/20150618175416/app/var /var/www/cdpaccess/shared/web/uploads )
INFO [041334b0] Finished in 0.091 seconds with exit status 0 (successful).
INFO [fdc1520e] Running /usr/bin/env setfacl -Rdm u:cdpaccess:rwx /var/www/cdpaccess/shared/app/logs /var/www/cdpaccess/releases/20150618175416/app/cache /var/www/cdpaccess/releases/20150618175416/app/var /var/www/cdpaccess/shared/web/uploads as [email protected]
DEBUG [fdc1520e] Command: ( SYMFONY_ENV=prod /usr/bin/env setfacl -Rdm u:cdpaccess:rwx /var/www/cdpaccess/shared/app/logs /var/www/cdpaccess/releases/20150618175416/app/cache /var/www/cdpaccess/releases/20150618175416/app/var /var/www/cdpaccess/shared/web/uploads )
INFO [fdc1520e] Finished in 0.090 seconds with exit status 0 (successful).

If I run the same commands again, but I include the web server user:

setfacl -Rm u:cdpaccess:rwx -m u:apache:rwx ...
setfacl -Rdm u:cdpaccess:rwx -m u:apache:rwx ...

This works!

from symfony.

pstephenson02 avatar pstephenson02 commented on August 18, 2024

Last comment for anyone reading:

I was able to resolve this by adding the line:

set :file_permissions_users, ['apache']

This comes from the capistrano/file-permissions documentation and after adding it indeed I can see the u:apache:rwx is added to the setfacl command.

I'm unsure as to whether this set :webserver_user is intended to accomplish the same thing or not. Either way, hope this helps someone!

Thanks

from symfony.

fdonzello avatar fdonzello commented on August 18, 2024

many thanks @pstephenson02

I created a PR to fix the documentation.

from symfony.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.