Get/Set Permissions

James Cook JC at JamesCook.biz
Thu Mar 13 11:42:37 PDT 2008


It's terrific that we can use Panorama to get or set permissions on 
OS X. However, comparing the documentation to the results and to what 
other software suggests leaves the waters a bit murky.

The Panorama Reference example shows SetFilePermissions with 3 
digits. Using GetFilePermissions always results in 5 digits. Between 
Owner, Group and Others, there are three sets of Permissions for a 
file or folder so I'd expect 3 to be correct.

Even then it doesn't seem to match the results I see in other 
software. Read is typically a value of 4, Write is 2 and Execute is 
1. So a setting for, say Read and Write is the sum of 4+2 or 6. The 
potential range is 1 through 7. Yet GetFilePermissions uses digits 0 
through 9.

My expectation would be that a file set for Read & Write would be 666 
but GetFilePermissions shows 33206.

I could use some further enlightenment.


-- 
James Cook
JC at JamesCook.biz
720-252-7042

Proficiencies
http://JamesCook.biz

Founder of HindSight Ltd.
http://HSLtd.us

Custom Panorama Applications
Specializing in Panorama Enterprise for the Web


More information about the Qna mailing list