16

I was following a tutorial and it told me to run

sudo chmod +a "SOME_PARAMS" some/dir

I was surprised to see that fail telling me

chmod: invalid mode: `+a'

So I wonder: What does the +a mode mean? How would I translate it into something Ubuntu understands? And I also like to know why it isn't universally supported.

24

I have never seen +a, only something like chmod a+r which means "add read permissions to all users" (owner/user, group, others).

From man 1 chmod:

The format of a symbolic mode is [ugoa...][[+-=][perms...]...], where perms is either zero or more letters from the set rwxXst, or a single letter from the set ugo. Multiple symbolic modes can be given, separated by commas.

A combination of the letters ugoa controls which users' access to the file will be changed: the user who owns it (u), other users in the file's group (g), other users not in the file's group (o), or all users (a). If none of these are given, the effect is as if a were given, but bits that are set in the umask are not affected.

Right, as you said in a comment, it's Mac OS X specific. From http://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/chmod.1.html:

The ACL manipulation options are as follows:

+a
The +a mode parses a new ACL entry from the next argument on the commandline and inserts it into the canonical location in the ACL. If the supplied entry refers to an identity already listed, the two entries are combined.

0

The ACL is needed to set permissions sometimes.

I found a related instruction. This document on web contents manual exlains about setting ACL for designated user.

https://docs.moodle.org/37/en/Installing_Moodle#Download_and_copy_files_into_place

New contributor
intrajp is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • That seems to be a comment to another answer. – RalfFriedl 2 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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