Giter VIP home page Giter VIP logo

Comments (9)

chrisvanpatten avatar chrisvanpatten commented on July 18, 2024 1

FWIW, I also had to deal with this, in an Ubuntu environment without setfacl (and without the ability to install it).

Ended up setting laravel_set_acl_paths to false, and that seems to have fixed the problem.

from laravel.

peterjmit avatar peterjmit commented on July 18, 2024

Hi @allaire, the reason I chose acl as the default is because I felt is was more secure. With ACL you only give permissions to those you explicitly define (usually the deploying user, and the web-server user).

Chmod is a little more of a sledgehammer approach, although I agree that it is a pain point that setfacl is not there by default.

I agree the documentation needs improving, perhaps I will work on that first (unless you are offering 😄)

from laravel.

allaire avatar allaire commented on July 18, 2024

For some reason, even with ACL installed, and rwx on www-data (running on ubuntu 12.04), Laravel can't write to storage directory on errrors. any ideas?

Note that it's not able to write in storage/ when I get an error using Laravel 4 smart errors

from laravel.

peterjmit avatar peterjmit commented on July 18, 2024

Do you know what version of https://github.com/capistrano/file-permissions you have?

The problem could lie with the sefacl call not being recursive (can you paste the output)

from laravel.

allaire avatar allaire commented on July 18, 2024

Here's my lock file

GEM
  remote: https://rubygems.org/
  specs:
    capistrano (3.1.0)
      i18n
      rake (>= 10.0.0)
      sshkit (~> 1.3)
    capistrano-composer (0.0.3)
      capistrano (>= 3.0.0.pre)
    capistrano-file-permissions (0.1.0)
      capistrano (>= 3.0.0)
    capistrano-laravel (0.0.2)
      capistrano (>= 3.0.0)
      capistrano-composer (>= 0.0.3)
      capistrano-file-permissions
    i18n (0.6.9)
    net-scp (1.1.2)
      net-ssh (>= 2.6.5)
    net-ssh (2.7.0)
    rake (10.1.1)
    sshkit (1.3.0)
      net-scp (>= 1.1.2)
      net-ssh
      term-ansicolor
    term-ansicolor (1.2.2)
      tins (~> 0.8)
    tins (0.13.1)

PLATFORMS
  ruby

DEPENDENCIES
  capistrano (~> 3.1.0)
  capistrano-laravel

Here's the output the setfacl

 INFO [22a4e32c] Running /usr/bin/env setfacl -m u:www-data:rwx,u:my_user:rwx /home/my_user/apps/new/releases/20140326172906/app/storage /home/my_user/apps/new/releases/20140326172906/app/storage/cache /home/my_user/apps/new/releases/20140326172906/app/storage/logs /home/my_user/apps/new/releases/20140326172906/app/storage/meta /home/my_user/apps/new/releases/20140326172906/app/storage/sessions /home/my_user/apps/new/releases/20140326172906/app/storage/views on staging.my_user.com
DEBUG [22a4e32c] Command: /usr/bin/env setfacl -m u:www-data:rwx,u:my_user:rwx /home/my_user/apps/new/releases/20140326172906/app/storage /home/my_user/apps/new/releases/20140326172906/app/storage/cache /home/my_user/apps/new/releases/20140326172906/app/storage/logs /home/my_user/apps/new/releases/20140326172906/app/storage/meta /home/my_user/apps/new/releases/20140326172906/app/storage/sessions /home/my_user/apps/new/releases/20140326172906/app/storage/views
 INFO [22a4e32c] Finished in 0.069 seconds with exit status 0 (successful).
 INFO [2d14f336] Running /usr/bin/env setfacl -Rdm u:www-data:rwx,u:my_user:rwx /home/my_user/apps/new/releases/20140326172906/app/storage /home/my_user/apps/new/releases/20140326172906/app/storage/cache /home/my_user/apps/new/releases/20140326172906/app/storage/logs /home/my_user/apps/new/releases/20140326172906/app/storage/meta /home/my_user/apps/new/releases/20140326172906/app/storage/sessions /home/my_user/apps/new/releases/20140326172906/app/storage/views on staging.my_user.com
DEBUG [2d14f336] Command: /usr/bin/env setfacl -Rdm u:www-data:rwx,u:my_user:rwx /home/my_user/apps/new/releases/20140326172906/app/storage /home/my_user/apps/new/releases/20140326172906/app/storage/cache /home/my_user/apps/new/releases/20140326172906/app/storage/logs /home/my_user/apps/new/releases/20140326172906/app/storage/meta /home/my_user/apps/new/releases/20140326172906/app/storage/sessions /home/my_user/apps/new/releases/20140326172906/app/storage/views

from laravel.

allaire avatar allaire commented on July 18, 2024

I had to use:

namespace :deploy do
  after :updated, 'deploy:set_permissions:chmod'
end

In order to make it works correctly.

from laravel.

ikari7789 avatar ikari7789 commented on July 18, 2024

Sorry for the late response. I'll be helping maintain this plugin for the foreseeable future. If any of these issues are still persisting (all of the tickets are quite old), please let me know and I will do what I can to try and help fix things.

from laravel.

ikari7789 avatar ikari7789 commented on July 18, 2024

The latest version of the gem released should have a flag to set this. I don't think I implemented chmod, I'll look into it, but you should be able to toggle on/off the permission setting.

Sent from my iPhone

On Jun 18, 2016, at 05:11, Chris Van Patten [email protected] wrote:

FWIW, I also had to deal with this, in an Ubuntu environment without setfacl (and without the ability to install it).

Ended up setting laravel_set_acl_paths to false, and that seems to have fixed the problem.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

from laravel.

osaris avatar osaris commented on July 18, 2024

Problem is that acl is combined with POSIX permissions [1] so setting ACL only isn't enough in some case, resulting in :

user:www-data:rwx #effective:r-x

[1] http://www.vanemery.com/Linux/ACL/POSIX_ACL_on_Linux.html

from laravel.

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.