-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Unable to setup correct permissions for writable dirs. #1118
Comments
Try run each command on server by your self:
|
Hi Anton, On line one i get the following: |
Thats okay. What on second one? |
No output. Thanks :) |
Everything works then? |
Not quite! Only that line of code works as requested
…--- Original Message ---
From: "Anton Medvedev" <notifications@github.com>
Sent: 21 March 2017 6:10 pm
To: "deployphp/deployer" <deployer@noreply.github.com>
Cc: "oliverkuchies" <oliver@olidev.me>, "Author" <author@noreply.github.com>
Subject: Re: [deployphp/deployer] Unable to setup correct permissions for writable dirs. (#1118)
Everything works then?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1118 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AKkiBLW2Dz6Mjkg8zA4VUfD4jsWX9NuWks5rn3eygaJpZM4MiEYx>.
|
You need to configure sudo's sudoers files to not prompt for password, |
I have the same problem. |
What problem? |
I have the same problem. |
Check if acl is installed: Try this:
|
Great. I found out that my ACL wasn't installed. Yes by running it solved my issue. Thank you. |
in my case i have right config but not acl in ubuntu server sudo apt-get install acl |
Hi every One, If you have deploy first one with some problem (bad permission on storage, or package missed, or other, .....), solve all problem, but delete current realese in deployment before restart deploy. Hope this help you.... |
In my case, a shared hosting without access to apt-get, I just had to change writable_mode to use chmod instead of the default acl. |
http_userのIssue 気にしなくても良いと言われたが気持ちわるいので、エラーがでないようにした [Can't detect http user name. Please setup `http_user` config parameter. · Issue #1649 · deployphp/deployer](deployphp/deployer#1649) writable_modeのIssue deployphp/deployer#1118 (comment)
@antonmedv Is it possible to check if acl is installed and show a more helpful error message if not? If that’s not possible, I’d still suggest adjusting the error message slightly to:
The current error messages don’t suggest that the problem may be a missing dependency |
Yes, this will be cool. Actually I’m thinking about rewriting permissions system to something more reliable. |
It looks to me like the chmod command is incomplete. I am having the same problem |
Description
If you're reporting a bug, please include following information
Steps to reproduce
dep deploy -vvv
Remote system is running on root so sudo shouldn't be a problem.
Content of
deploy.php
Output log
With enabled option for verbose output
-vvv
.vagrant@homestead:/Code/api_server$ dep deploy -vvv
➤ Executing task deploy:prepare
[production] > echo $0
SSH multiplexing initialization
Enter passphrase for key '/home/vagrant/.ssh/id_rsa':
[production] < bash
[production] > if [ ! -d /var/www/api_server ]; then mkdir -p /var/www/api_server; fi
[production] > if [ ! -L /var/www/api_server/current ] && [ -d /var/www/api_server/current ]; then echo true; fi
[production] > cd /var/www/api_server && if [ ! -d .dep ]; then mkdir .dep; fi
[production] > cd /var/www/api_server && if [ ! -d releases ]; then mkdir releases; fi
[production] > cd /var/www/api_server && if [ ! -d shared ]; then mkdir shared; fi
• done on [production]
✔ Ok [13s 225ms]
➤ Executing task deploy:lock
[production] > if [ -f /var/www/api_server/.dep/deploy.lock ]; then echo 'true'; fi
[production] > touch /var/www/api_server/.dep/deploy.lock
• done on [production]
✔ Ok [893ms]
➤ Executing task deploy:release
[production] > cd /var/www/api_server && (if [ -h release ]; then echo 'true'; fi)
[production] < true
[production] > cd /var/www/api_server && (rm -rf "$(readlink release)")
[production] > cd /var/www/api_server && (rm release)
[production] > cd /var/www/api_server && ([ -d releases ] && [ "$(ls -A releases)" ] && echo "true" || echo "false")
[production] < false
[production] > cd /var/www/api_server && (if [ -d /var/www/api_server/releases/1 ]; then echo 'true'; fi)
[production] > cd /var/www/api_server && (date +"%Y%m%d%H%M%S")
[production] < 20170320142529
[production] > cd /var/www/api_server && (echo '20170320142529,1' >> .dep/releases)
[production] > cd /var/www/api_server && (mkdir /var/www/api_server/releases/1)
[production] > cd /var/www/api_server && (if [[ "$(man ln)" =~ "--relative" ]]; then echo "true"; fi)
[production] < true
[production] > cd /var/www/api_server && (ln -nfs --relative /var/www/api_server/releases/1 /var/www/api_server/release)
• done on [production]
✔ Ok [4s 576ms]
➤ Executing task deploy:update_code
[production] > which git
[production] < /usr/bin/git
[production] > /usr/bin/git version
[production] < git version 2.11.0
[production] > if [ -h /var/www/api_server/release ]; then echo 'true'; fi
[production] < true
[production] > readlink /var/www/api_server/release
[production] < releases/1
[production] > /usr/bin/git clone --recursive -q git@bitbucket.org:oliverkucharzewski/--api-server.git /var/www/api_server/releases/1 2>&1
• done on [production]
✔ Ok [7s 971ms]
➤ Executing task deploy:shared
[production] > if [ -d /var/www/api_server/shared/storage ]; then echo 'true'; fi
[production] < true
[production] > rm -rf /var/www/api_server/releases/1/storage
[production] > mkdir -p
dirname /var/www/api_server/releases/1/storage
[production] > ln -nfs --relative /var/www/api_server/shared/storage /var/www/api_server/releases/1/storage
[production] > if [ -f $(echo /var/www/api_server/releases/1/.env) ]; then rm -rf /var/www/api_server/releases/1/.env; fi
[production] > if [ ! -d $(echo /var/www/api_server/releases/1/.) ]; then mkdir -p /var/www/api_server/releases/1/.;fi
[production] > mkdir -p /var/www/api_server/shared/.
[production] > touch /var/www/api_server/shared/.env
[production] > ln -nfs --relative /var/www/api_server/shared/.env /var/www/api_server/releases/1/.env
• done on [production]
✔ Ok [4s 4ms]
➤ Executing task deploy:vendors
[production] > if hash composer 2>/dev/null; then echo 'true'; fi
[production] < true
[production] > which composer
[production] < /usr/local/bin/composer
[production] > which php
[production] < /usr/bin/php
[production] > cd /var/www/api_server/releases/1 && /usr/bin/php /usr/local/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader
[production] < Generating optimized class loader
[production] < The compiled class file has been removed.
• done on [production]
✔ Ok [6s 878ms]
➤ Executing task deploy:writable
[production] > ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1
[production] < www-data
[production] > cd /var/www/api_server/releases/1 && (mkdir -p bootstrap/cache storage storage/app storage/app/public storage/framework storage/framework/cache storage/framework/sessions storage/framework/views storage/logs storage)
[production] > cd /var/www/api_server/releases/1 && (chmod 2>&1; true)
[production] < chmod: missing operand
[production] < Try 'chmod --help' for more information.
[production] > cd /var/www/api_server/releases/1 && (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.
➤ Executing task deploy:failed
• done on [production]
✔ Ok [0ms]
➤ Executing task deploy:unlock
[production] > rm -f /var/www/api_server/.dep/deploy.lock
• done on [production]
✔ Ok [453ms]
[RuntimeException]
Cant't set writable dirs with ACL.
Exception trace:
() at phar:///usr/local/bin/dep/recipe/deploy/writable.php:83
Deployer{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/dep/src/Task/Task.php:85
Deployer\Task\Task->run() at phar:///usr/local/bin/dep/src/Executor/SeriesExecutor.php:40
Deployer\Executor\SeriesExecutor->run() at phar:///usr/local/bin/dep/src/Console/TaskCommand.php:103
Deployer\Console\TaskCommand->execute() at phar:///usr/local/bin/dep/vendor/symfony/console/Command/Command.php:262
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/dep/vendor/symfony/console/Application.php:826
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/dep/src/Console/Application.php:123
Deployer\Console\Application->doRunCommand() at phar:///usr/local/bin/dep/vendor/symfony/console/Application.php:189
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/dep/vendor/symfony/console/Application.php:120
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/dep/src/Deployer.php:190
Deployer\Deployer->run() at phar:///usr/local/bin/dep/bin/dep:119
require() at /usr/local/bin/dep:4
deploy [-p|--parallel] [--no-hooks]
The text was updated successfully, but these errors were encountered: