2

whats the equivalent command of this (Fedora command) for Ubuntu:

chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

When I try the above with Ubuntu (10.0.4 LTS), I get the error message:

chmod: invalid mode: `+a'
Try `chmod --help' for more information.
0

2 Answers 2

5

chmod uses a series of numeric entries to set file permissions rather than strings. The ubuntu version of the command given would be

chmod 0755 app/cache app/logs

This should work assuming www-data is the owner. If not,

chown www-data.www-data app/cache app/logs

will change it so www-data owns the directories.

Detailed article: http://mdshaonimran.wordpress.com/2010/06/13/chmod-change-filefolder-permission-in-ubuntu/

3
2

The chmod +a actually sets an ACL that maintains the permissions when the directory is written to. The reason it's being used here is so that files and logs written to by the webserver, user www-data, have the same permissions as files written to by a user on the CLI.

It looks like he's pulling this from the Symfony 2 installation instructions. Take a look at the updated documentation: http://symfony.com/doc/current/book/installation.html

It states that the equivalent command in Ubuntu is

$ sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
$ sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .