Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.
share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

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/

share|improve this answer
2  
    
Er, it looks like he's trying to add an ACL entry, not change the basic permissions. –  Random832 Mar 13 '12 at 18:59
    
@Random832 But apparently he was. –  hrishioa Mar 14 '12 at 4:00
add comment

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
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.