Determine Write Protection?

Yates, Glen JAMES.G.YATES at saic.com
Wed Apr 10 18:31:01 EDT 2002


> -----Original Message-----
> From: Scott Rossi [mailto:scott at tactilemedia.com]
>
> 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?

No.

Because, lets say I create a directory "mydir" and I don't want other people
to muck with it, so I do a:

	chmod 755 mydir

Now if I run your program, I should still be able to write to this
directory, but if someone else ran your program, then they would not be able
to write to that directory. Remember, that the permissions are in the order
(user, group, other).

-Glen Yates



More information about the metacard mailing list