Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

what is the exact analog of the following two commands in linux

# chmod -R +a "www-data allow read,delete,write,append,file_inherit,directory_inherit" /path/to/moodledata

$ sudo chmod -R +a "whoami allow read,delete,write,append,file_inherit,directory_inherit" /path/to/moodledata

When I run these two commands I got

chmod: invalid mode: `+a'

Here is the link where these two commands are written.
Go to the section "Create the (moodledata) data directory" on that document. are those commands valid in Linux/Ubuntu? My inverstigation says than +a mode for chmod is available for Mac OS. So I want to ask from experts whether linux/ubuntu have analogs of these two commands?

share|improve this question
You do never want to chmod 777 your moodledate folder, won't you? – ansi_lumen Sep 11 '13 at 8:49

The chmod syntax allows to combine several attributes. For example

  chmod -R +w,+x,+r /path/that/is/not/your/moodledata

would be the equivalent of what you tried to achieve. It is always better, to combine this with a user option. The -R means that the changes are going to be done recursively.

  chmod -R g+w,u+w,o-w /path/that/is/not/your/moodledata

g=group, u=user, o=others. The attributes are r ead, w rite and e x ecute. By the way, man chmod can be your friend.

share|improve this answer
thanks for the answer. i had read the man. I changed my question the way that you can understand my question. – Unhandled Exception Sep 11 '13 at 11:25

for having the same (or near same) permissions in /moodledata first you should change the owner, the group and then set the permissions (it worked for me using moodle 2.7 from git on centos 6.6), given moodledata IS empty!

chown apache /path/to/moodledata

chgrp apache /path/to/moodledata

chmod 2777 /path/to/moodledata

executing sudo -u apache /usr/bin/php /var/www/html/moodle/admin/cli/install.php (beware! run SUDO as APACHE, not as ROOT!) notes:

Data directories permission == type value, press Enter to use default value (2777)

where 2777 is the default file permission.

share|improve this answer

You must log in to answer this question.

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