Determine Write Protection?

Scott Rossi scott at tactilemedia.com
Wed Apr 10 15:58:01 EDT 2002


>> From: Scott Rossi [mailto:scott at tactilemedia.com]
>> In answer to the above, it is correct that I can use the detailed
>> folders function to retrieve the file permissions of a
>> folder?  If yes,
>> then apparently "777" is OK to write, but "555" is read-only?
>
> Well, more accurately "777" is read, write, and execute for owner, 
> group,
> and world. And "555" is read and execute for owner, group, and world.
>
> But, I see now that you are talking about folders (directories), and 
> they
> must have execute privileges. If, however you only wanted read 
> permissions
> for everyone for a file, with no ability to execute the file, then the
> proper permissions would be "444"

Thanks for this Glen.  Actually, what I need to verify is that a 
selected directory has write permissions.  It appears from checking 
several pre-existing writable folders that the octal is 777 on these.  
So in my script I was planning to use:

# tFolderInfo is the detailed folder
# information of a user-specified folder
if item 10 of tFolderInfo <> "777" then doAlertStuff

In your opinion, will this suffice?

Regards,

Scott Rossi
Creative Director, Tactile Media
scott at tactilemedia.com
http://www.tactilemedia.com




More information about the metacard mailing list