file-permissions icon indicating copy to clipboard operation
file-permissions copied to clipboard

setfacl: Option -m: Invalid argument near character 3 on Ubuntu 14.04

Open Nico-h opened this issue 8 years ago • 6 comments

Hi, I'm unfortunately facing this error with Ubuntu 14.04 but it works fine with Debian 8

Deploy.rb file:

set :file_permissions_paths, ["web", "web/logs", "resources/cache"]
set :file_permissions_chmod_mode, "0777"
set :file_permissions_users, ["www-data"]
before "deploy:updated", "deploy:set_permissions:acl"

Last stack:

INFO [e9cb5f4a] Running /usr/bin/env setfacl -dRn -m u:www-data:rwX -m u::rwX /var/www/html//releases/20160708145928/web /var/www/html//releases/20160708145928/web/logs /var/www/html/...

DEBUG [e9cb5f4a] Command: /usr/bin/env setfacl -dRn -m u:www-data:rwX -m u::rwX /var/www/html//releases/20160708145928/web /var/www/html//releases/20160708145928/web/logs /var/www/html/...

INFO [e9cb5f4a] Finished in 0.013 seconds with exit status 0 (successful).

DEBUG [648790b1] setfacl: Option -m: Invalid argument near character 3

Cap deploy failes. Update list and upgrade packages done.

Any idea please ?

Thanks very much

Nico-h avatar Jul 08 '16 15:07 Nico-h

The error occurs when I have a multiple server deploy with different users. Otherwise it works separately.

Nico-h avatar Jul 11 '16 08:07 Nico-h

Can you please make sure that the user www-data exists?

I noticed that running /usr/bin/env setfacl -dRn -m u:<userX>:rwX when userX does not exist emits this kind of error.

zorbash avatar Sep 19 '16 09:09 zorbash

According to the last documentation, they removed the -n parameter http://symfony.com/doc/current/setup/file_permissions.html#using-acl-on-a-system-that-supports-setfacl-linux-bsd

kevin-lot avatar Oct 06 '16 12:10 kevin-lot

In fact, on master the -n parameter is missing like the official documentation. Can you tag your code version plz ?

kevin-lot avatar Oct 06 '16 12:10 kevin-lot

Had this issue on CentOS. Here the user "www-data" is not present but rather "nginx", "apache", or "httpd". Switching the user to one that was present, worked for me for a multiple server deployment!

lustremedia avatar Nov 16 '17 12:11 lustremedia

This still occurs and it's a very bad way to say "user not found". Edit: This isn't even the right project. I'll look somewhere else

7eggert avatar Sep 24 '23 11:09 7eggert