what do these permissions mean?

0

1

I did chmod on some files in Mac 10.7.3 and I accidentally entered the code 7744 instead of 744.

The resulting permissions were:

-rwsr-Sr-T

After seeing this I reran chmod and fixed the permissions to:

-rwxr--r--

I understand that I put a bad permissions code in, but I was curious what those permissions mean.

Any ideas?

Update

the command ran was:

sudo chmod 7744 ./*

Patrick

Posted 2012-05-07T15:39:08.647

Reputation: 1 216

Answers

2

The extra 7 set the setuid ("set user ID"), setgid ("set group ID"), and sticky bits in the permissions.

The "s" in the user permissions means it has execute and set ID permissions, the "S" in group means it has set ID but not execute, and the "T" in the other perms means it has the sticky bit but not execute (lowercase "t" would mean both execute and sticky).

See man chmod for details on the meaning of the extra digit, and man ls for details of how ls shows the results.

Gordon Davisson

Posted 2012-05-07T15:39:08.647

Reputation: 28 538