PHP deployer – task deploy:unlock throws RuntimeException

I use the deployer bundle

with an symfony4 receipe to deploy my symfony5 app to an Centos Server from uberspace via SSH.

My deploy.php looks like this:

namespace Deployer;

require 'recipe/symfony4.php';

// Project name
set('application', '');

// Project repository
set('repository', '[email protected]:username/');

// [Optional] Allocate tty for git clone. Default value is false.
set('git_tty', false);

set('ssh_multiplexing', false);

set('default_stage', 'production');

// Shared files/dirs between deploys 
add('shared_files', []);
add('shared_dirs', []);

// Writable dirs by web server 
add('writable_dirs', []);

// Hosts

    ->addSshOption('UserKnownHostsFile', '/dev/null')
    ->addSshOption('StrictHostKeyChecking', 'no')
    ->set('/var/www/virtual/username/system', '~/{{application}}')
    ->set('deploy_path', '/var/www/virtual/username/system')
    ->set('http_user', 'www-data');
// Tasks
task('pwd', function () {
    $result = run('pwd');
    writeln("Current dir: $result");

task('build', function () {
    run('cd {{release_path}} && build');

// [Optional] if deploy fails automatically unlock.
after('deploy:failed', 'deploy:unlock');

// Migrate database before symlink new release.

before('deploy:symlink', 'database:migrate');

The Task "deploy:unlock" failed with this exeception:

 [DeployerExceptionRuntimeException (2)]
  The command "cd /var/www/virtual/username/system/releases/5 && (setfacl -L -R -m u:"httpd":rwX -m u:`whoami`:rwX var)" failed.

  Exit Code: 2 (Misuse of shell builtins)

  Host Name:

  Warning: Permanently added ',2a00:d0c0:200:0:a88f:85ff:fe87:1061' (ED25519) to the list of known hosts.
  setfacl: Option -m: Invalid argument near character 3

Anyone an idea to fix it?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *