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

setfacl illegal option -- R on FreeBSD

Open webdevilopers opened this issue 9 years ago • 1 comments

Our provider enabled acl for us on their FreeBSD server. Unfortunately the option -R does not seem to exist on FreeBSD:

ommand: ( SYMFONY_ENV=prod /usr/bin/env setfacl -Rm
u:vuser:rwx,u:foobar:rwx
/usr/local/www/apache24/noexec/foobar/shared/app/logs
/usr/local/www/apache24/noexec/foobar/releases/20160210175337/app/cache
)
DEBUG [fb0c7ccf]     setfacl: illegal option -- R
DEBUG [fb0c7ccf]     usage: setfacl [-bdhkn] [-a position entries] [-m
entries] [-M file] [-x entries] [-X file] [file ...]
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing as
[email protected]: Exception while executing
as [email protected]: setfacl exit status: 1
setfacl stdout: Nothing written
setfacl stderr: setfacl: illegal option -- R
usage: setfacl [-bdhkn] [-a position entries] [-m entries] [-M file]
[-x entries] [-X file] [file ...]

Any ideas / workarounds? https://github.com/capistrano/symfony/pull/32 @alafon @peterjmit

webdevilopers avatar Feb 11 '16 11:02 webdevilopers

@webdevilopers

The obvious solution is to replace

setfacl -R <your_options> <directory>

with

find <directory> -exec setfacl <your_options> {} \;

somewhere here https://github.com/capistrano/file-permissions/blob/master/lib/capistrano/tasks/file-permissions.rake#L45

aminin avatar Jun 23 '16 08:06 aminin