Deployer: Got error on deploy:writable.

Created on 17 Jan 2018  Â·  4Comments  Â·  Source: deployphp/deployer

| Q | A
| ----------------- | ---
| Issue Type | Bug
| Deployer Version | 4.3.2
| Local Machine OS | ubuntu
| Remote Machine OS | ubuntu

Description

I face problems like #1118 and try to run manually (if hash setfacl 2>/dev/null; then echo 'true'; fi) that return true. When run dep deploy prd again, it works fine.

Content of deploy.php

serverList('servers.yml');
set('keep_releases', 3);
add('writable_dirs', ['vendor']);
set('shared_dirs', ['storage']);
set('writable_use_sudo', false);
set('http_user', 'x');
set('composer_action', 'update');

task('deploy', [
    'deploy:prepare',
    'deploy:release',
    'deploy:update_code',
    'deploy:shared',
    'deploy:vendors',
    'deploy:writable',
    'deploy:symlink',
    'deploy:symlink_x',
    'deploy:public_disk',
    'deploy:copy:env',
    'deploy:stampbuild',
    'cleanup',
    'artisan:clear:compiled',
    'artisan:migrate',
    'artisan:db:seed:additionalpermissionseeder',
    'artisan:migrate:status',
    'artisan:cache:clear',
    'artisan:route:clear',
    'artisan:view:clear',
    'artisan:config:cache',
    'artisan:queue:restart',
    'current',
])->desc('Deploy your project');

after('artisan:migrate', 'artisan:db:seed:additionalpermissionseeder');

Output log

➤ Executing task deploy:writable
[prd] > cd /srv/users/x/apps/ofn-prd/releases/15 && (mkdir -p bootstrap/cache storage storage/app storage/app/public storage/framework storage/framework/cache storage/framework/sessions storage/framework/views storage/logs vendor)
[prd] > cd /srv/users/x/apps/ofn-prd/releases/15 && (chmod 2>&1; true)
[prd] > cd /srv/users/x/apps/ofn-prd/releases/15 && (if hash setfacl 2>/dev/null; then echo 'true'; fi)

Unable to setup correct permissions for writable dirs.
You need to configure sudo's sudoers files to not prompt for password,
or setup correct permissions manually.
➤ Execut ing task deploy:failed
• done on [prd]
✔ Ok [0ms]

In writable.php line 83:

[RuntimeException]
Cant't set writable dirs with ACL.

Exception trace:
Deployer{closure}() at n/a:n/a
call_user_func() at /home/laradock/.composer/vendor/deployer/deployer/src/Task/Task.php:85
Deployer\Task\Task->run() at /home/laradock/.composer/vendor/deployer/deployer/src/Executor/SeriesExecutor.php:40
Deployer\Executor\SeriesExecutor->run() at /home/laradock/.composer/vendor/deployer/deployer/src/Console/TaskCommand.php:103
Deployer\Console\TaskCommand->execute() at /home/laradock/.composer/vendor/symfony/console/Command/Command.php:252
Symfony\Component\Console\Command\Command->run() at /home/laradock/.composer/vendor/symfony/console/Application.php:938
Symfony\Component\Console\Application->doRunCommand() at /home/laradock/.composer/vendor/deployer/deployer/src/Console/Application.php:123

Most helpful comment

@antonmedv FYI, I add set('writable_mode', 'chown'); The problems has gone.

All 4 comments

You need to configure sudo's sudoers files to not prompt for password,
or setup correct permissions manually.

OK Thank you so much.

@antonmedv FYI, I add set('writable_mode', 'chown'); The problems has gone.

set('writable_mode', 'chown');
Saved me after battling this issue for the past 3 days @minkbear . Thanks so much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

antonmedv picture antonmedv  Â·  5Comments

dima-stefantsov picture dima-stefantsov  Â·  5Comments

jolipixel picture jolipixel  Â·  4Comments

chouex picture chouex  Â·  4Comments

dima-stefantsov picture dima-stefantsov  Â·  4Comments