Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 8 down vote accepted

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.

share|improve this answer
4  
It's not as much a mistake, but more MacOS specific developer.apple.com/library/mac/#documentation/Darwin/Reference/… –  k0pernikus May 27 '12 at 16:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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