RE: Determine Write Protection?

2002-04-10 Thread Yates, Glen

> -Original Message-
> From: Scott Rossi [mailto:[EMAIL PROTECTED]]
>
> 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
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Determine Write Protection?

2002-04-10 Thread Scott Rossi


>> From: Scott Rossi [mailto:[EMAIL PROTECTED]]
>> 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
[EMAIL PROTECTED]
http://www.tactilemedia.com

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Determine Write Protection?

2002-04-10 Thread andu

Scott Rossi wrote:
> 
> I asked:
> 
> > On Windows, is there any way to determine if a folder or the drive is
> > write-protected without actually trying to write a file?
> 
> 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?

Don't know on Windows but on Linux 666 is read/write for all and 644 is
read/write by owner and read by others. Maybe that helps.

> 
> Thanks & Regards,
> 
> Scott Rossi
> Creative Director, Tactile Media
> [EMAIL PROTECTED]
> http://www.tactilemedia.com
> >
> 
> ___
> metacard mailing list
> [EMAIL PROTECTED]
> http://lists.runrev.com/mailman/listinfo/metacard

-- 

Regards, Andu Novac
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



RE: Determine Write Protection?

2002-04-10 Thread Yates, Glen



> -Original Message-
> From: Scott Rossi [mailto:[EMAIL PROTECTED]]
> 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"

-Glen Yates
___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard



Re: Determine Write Protection?

2002-04-10 Thread Scott Rossi


I asked:

> On Windows, is there any way to determine if a folder or the drive is 
> write-protected without actually trying to write a file?

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?

Thanks & Regards,

Scott Rossi
Creative Director, Tactile Media
[EMAIL PROTECTED]
http://www.tactilemedia.com
>

___
metacard mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/metacard