Quote:
Originally posted by HQ
Can a script read and write a file with "6" permission instead of "7" (with read and write instead of read, write, and execute)?
In other words, what is the execute bit used for?
|
The execute bit is used differently for directories than for files. For files, the execute bit determines who can run it as a program. For directories, it determines who can access that directory.
To answer your question, yes a program can read and write any file with a permission of 0##6 (leading "0" designates Octal Notation. "#" can be any octal number). However, if it was in a directory with permissions that are any even number (which is what happens when the execute bit for "other" is not set to 1), you're going to have problems...
__________________
<CENTER><A HREF="http://www.hot-off-bourbon.com/" target="_blank"><IMG SRC="http://www.hot-off-bourbon.com/images/hob-logosmall.jpg" border="0"></A>
<FONT face="Comic Sans MS" SIZE="-1"><I>Mardi Gras, Spring Break, Wet-T, Night Club Action, UpSkirt, Oil Wrestling, Voyeur</I></FONT></CENTER>
|