Moodle 3.3.1 | openSUSE Leap 42.2 | ACL "chmod -R +a" issue

Moodle 3.3.1 | openSUSE Leap 42.2 | ACL "chmod -R +a" issue

by Walter Lopez -
Number of replies: 3

Hello!

I am following in the https://docs.moodle.org/33/en/Installing_Moodle guide for the installation of Moodle 3.3.1 in openSUSE Leap 42.2 but for some reason the OS does not accepts this:

chmod -R +a "wwwrun allow read,delete,write,append,file_inherit,directory_inherit" /srv/www/moodle.domain.com/htdocs
It returns:

chmod: invalid mode: ‘+a’
Try 'chmod --help' for more information.

Does someone ever had this issue?

I read nowadays the ACLs are enabled by default in EXT4 filesystem; anyway, I checked that's set in /etc/fstab and running (through tune2fs). So, in theory the command above should work right away, but it does not.

Can somebody point me in how to fix this issue?

Average of ratings: -
In reply to Walter Lopez

Re: Moodle 3.3.1 | openSUSE Leap 42.2 | ACL "chmod -R +a" issue

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

"If your server supports ACL..."

Looks like it does not. So you can't run this command. That's fine.

In reply to Howard Miller

Re: Moodle 3.3.1 | openSUSE Leap 42.2 | ACL "chmod -R +a" issue

by Walter Lopez -

Thanks for your input, Howard.

In reply to Walter Lopez

[Solved] Re: Moodle 3.3.1 | openSUSE Leap 42.2 | ACL "chmod -R +a" issue

by Walter Lopez -

It looks like I'll be able to answer my own question. First, I am afraid to say I missed an important note clearly state in the Moodle installation guide. Check it out:

The effect of the previous command is to allow the Apache user account 
(www-data in this case) to access and change files within the moodle 
site. Many people would consider this a brave move for a new site admin 
to implement. In a new moodle you can safely leave this out. A default 
Ubuntu install does not have the +a option for the chmod command anyway.
 The +a attribute is an ACL (Access Control List) facility which allows 
you to set per user access for individual files. For example, OSX has 
this by default.
Let me comment on that:

The a+ option of chmod mentioned in bold applies not only for Ubuntu but for others distributions. The important thing is that option as appears in the guide not applies to GNU/Linux. That's for Mac OS X. In GNU/Linux the syntax is something like a+w, ie. Please read to the man chmod for further details. So, basically one can no use the following command -as it is posted- in GNU/Linux:

# chmod -R +a "www-data allow read,delete,write,append,file_inherit,directory_inherit" /path/to/moodle
On the other hand, it is possible to set in GNU/Linux the ACL for /path/to/moodle by issuing:

setfacl -dm "u:wwwrun:rwx" /path/to/moodle
setfacl -dm "g:www:rwx" /path/to/moodle

Change wwwrun by your Apache's user and www for the group.