Changing access rights of the specific folder for specifeid user

1

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. http://docs.moodle.org/25/en/Installing_Moodle
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?

CEO at Apartico

Posted 2013-09-11T08:16:56.373

Reputation: 113

You do never want to chmod 777 your moodledate folder, won't you? – ansi_lumen – 2013-09-11T08:49:23.207

Answers

0

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.

ansi_lumen

Posted 2013-09-11T08:16:56.373

Reputation: 219

http://docs.moodle.org/25/en/Installing_Moodle – CEO at Apartico – 2013-09-11T11:20:12.613

thanks for the answer. i had read the man. I changed my question the way that you can understand my question. – CEO at Apartico – 2013-09-11T11:25:51.550

0

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.

ARyKaXaN

Posted 2013-09-11T08:16:56.373

Reputation: 1