Ubuntu – chmod: What does the `+a` parameter mean

bsdchmodosxUbuntu

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.

Best Answer

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.