Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writable chmod not working #96

Closed
emotality opened this Issue Mar 1, 2019 · 4 comments

Comments

Projects
None yet
3 participants
@emotality
Copy link

emotality commented Mar 1, 2019

Hi Loris! I'm having issues with chmod. It doesn't wanna give access to my storage folder, after each deploy I have to manually ssh and give the folder access to write to storage.

Not sure what changed as I use the below options for all my projects and they work fine? Stopped working about 1 to 1.5 weeks ago.

'options' => [
    'application'              => env('APP_NAME'),
    'repository'               => env('DEPLOYER_REPO'),
    'branch'                   => env('DEPLOYER_BRANCH', 'master'),
    'php_fpm_service'          => env('DEPLOYER_FPM', 'php7.2-fpm'),
    'default_timeout'          => 360,
    'keep_releases'            => 3,
    'release_name'             => date('YmdHi'),
    'composer_action'          => 'install',
    'composer_options'         => '{{composer_action}} --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader',
    'ssh_multiplexing'         => true,
    'writable_use_sudo'        => true,
    'writable_chmod_recursive' => true,
    'writable_chmod_mode'      => 777,
    'writable_mode'            => 'chmod',
    'writable_dirs'            => [
        'bootstrap/cache',
        'storage',
    ],
    'shared_files'             => [
        '.env',
    ],
    'shared_dirs'              => [
        'storage',
    ],
],

Please advise?
Thanks a lot!

@MCMainiac

This comment has been minimized.

Copy link

MCMainiac commented Mar 2, 2019

In general: never give 777 on anything. This is probably not related to your issue, just common practice.

@emotality

This comment has been minimized.

Copy link
Author

emotality commented Mar 2, 2019

I knew that thanks, not the issue here :)

@lorisleiva

This comment has been minimized.

Copy link
Owner

lorisleiva commented Mar 6, 2019

Hi there 👋

This must be an issue related to DeployerPHP since Laravel Deployer is not affecting this behaviour.

I've had a look through DeployerPHP's issues and couldn't find anything recent on chmod issues.

Maybe it's a permission issue following some changes on your server.

I hope this helps, I'm not sure what else to suggest.

@emotality

This comment has been minimized.

Copy link
Author

emotality commented Mar 8, 2019

Thanks, will check with them 😄

I create droplets from same Laravel snapshot I made, and it's only the recent projects that aren't working as the deployer versions are more up to date. 😬 I'll try using older version, thanks Loris!

@emotality emotality closed this Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.