chmod syntax… be careful!

Ben Hutchings has noted a quirk in the chmod syntax: If you use the “chmod o-x" syntax, but omit the "o" (Others) (or the "u" (User) or "g" (Group)), it will default to "a" (All).

So "chmod -x foo" becomes "chmod a-x foo"; similarly, "chmod +x foo" becomes "chmod a+x foo"

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: