Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'A bit more detail on 'Special Permissions' in Disk Utility' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A bit more detail on 'Special Permissions' in Disk Utility
Authored by: lavadude on Sep 30, '05 08:30:28AM

Let's hope it doesn't mean you've been violated, since I have the same string! And I also have


Anyway, I'm still curious about the permission values and what they represent.

The numbers are decimal represenations of the octal values, but they're too big to match the standard modes, which top out at 4777 octal.

Common Unix chmod setting 0644 would be 420 decimal.
Common Unix chmod setting 0755 would be 493 decimal.
Common Unix chmod setting 4755 would be 2541 decimal.
Not common Unix chmod setting 4777 would be 2559 decimal, and it would be the largest value represented, according to the chmod man page (see man chmod

But if you look at the numbers in the file
you'll note the following about the numbers

16893 decimal is 40755 in octal.
33060 decimal is 100444 in octal.

So it looks to me like Apple extended the bits used to manage the file attributes all the way up to at least 18 bits.

But what do these extra bits mean? They're not covered in the chmod manual page. However, just because they're not documented doesn't mean they don't exist.

/usr/include/sys/stat.h may hold some clues. While I have no proof of this, I'm guessing the following from the stat.h file is the extended meaning

#define S_IFMT 0170000 /* type of file mask */
#define S_IFIFO 0010000 /* named pipe (fifo) */
#define S_IFCHR 0020000 /* character special */
#define S_IFDIR 0040000 /* directory */
#define S_IFBLK 0060000 /* block special */
#define S_IFREG 0100000 /* regular */
#define S_IFLNK 0120000 /* symbolic link */
#define S_IFSOCK 0140000 /* socket */
#define S_IFWHT 0160000 /* whiteout */
#define S_ISVTX 0001000 /* save swapped text even after use */

Which seems to match up with the values in the HintFile.plist

/Library/ColorSync/Profiles/Displays is indeed a directory.
/usr/lib/php/build/acinclude.m4 is a regular file.

I wonder why they chose to do it this way, but it seems to be how it works...

[ Reply to This | # ]
A bit more detail on 'Special Permissions' in Disk Utility
Authored by: jms1 on Oct 09, '05 02:29:46AM

The chmod(1) and chmod(2) man pages don't document these "file type" bits because the chmod() function cannot change them. The stat(2) man page DOES document these values- type "man 2 stat" for a better explanation.

Side note- the value you're looking at is the "st_mode" value, which is defined as 16 bits (rather than 18 bits.) The highest possible value is 0177777 (which is 0xFFFF in hex, or 65535 decimal.)

[ Reply to This | # ]