On 15/02/06, Robert Himmelmann <[EMAIL PROTECTED]> wrote: > Barry wrote: > > > (after a lot of reading...) There are a lot of security matters being > > checked (cron hourly) but the man pages do not refer to inittab or > > this particular alt as far as I can see.. > > > > I have fixed my problem successfully by altering the offending line in > > libmsec.py, but what are peoples' thoughts on a script which writes to > > a file with permissions set to read only? > > > > Barry > > The owner and root can still write to a "read-only" file. You will get > "permission denied" in some but not all cases. I.e. :w or ZZ in vim do > not work but :w! does work.
Actually, you do get permission denied every time you try to write to a file that you don't have write access to. Some editors, however, will change the file's write-permission bit so it can be written, write it, then change the write-permission-bit back. Incidentally, there are 4 read/write states a file can be in for each of the 3 sets of owner, group, and other: read/write read-only write-only neither That is, the readability of a file is completely independant of the writeablity of a file. Cheers, Carl.