[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] Re: Keeping a file from being deleted
- Subject: Re: [cobalt-users] Re: Keeping a file from being deleted
- From: flash22@xxxxxxx
- Date: Sat Feb 2 02:01:44 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
On Fri, 1 Feb 2002, Charlie Summers wrote:
> At 9:39 AM -0500 2/1/02, AY@Home is rumored to have typed:
>
> > If you mean chown root/chgrp root and then chmod 444 the file in question I
> > tried that last night and again just now no luck.
>
> Er...first off, you have to su to root before you can use chown - that is,
> you must be the superuser before you can change the ownership of a file.
> Secondly, you don't need chgrp in this instance; "chown root.root filename"
> works just fine and saves some time. And if it were _me,_ I'd change it to
> 644 instead of 444; call me silly, but it makes more sense visually to see
> that root can write to the file in an ls -lag.
Hmm, but why make it executable at all if it's a text file?
In nay case, it's not going to do anything at all to prevent the file from
being deleted, delet/rename priv's are dictated by the write access of the
directory the file is in, the permissions of the file itself have no
effect on that....
the extended attributes are a special exception to that, making the file
immutable essentially tells the kernel to ignore the directory and refuse
to modify the files's inode properties....including it's entry in the
directory that contains it
chattr can be a bit of a surprise if you forget you used it tho, i tend to
recommend some caution here ;P
gsh