Re: can touch(1) readonly files

2003-05-14 Thread Dan Jacobson
I see, if I wanted chmod 444 to stop me from touch(1)ing my files, then I would have to give up $ chmod 0 x; ls -l x -- 1 jidanni jidanni 0 2003-05-14 07:38 x listing my files. Ok, over and out.

Re: can touch(1) readonly files

2003-05-13 Thread Russell Coker
On Wed, 14 May 2003 04:21, Branden Robinson wrote: > On Tue, May 13, 2003 at 11:10:26PM +1000, Russell Coker wrote: > > Bernd is correct. It's a kernel issue. > > > > SE Linux allows you [...] > > > > SE Linux allows control [...] > > Russell, you are such a pimp. ;-) I was provoked. ;) Anyway

Re: can touch(1) readonly files

2003-05-13 Thread Bernd Eckenfels
On Tue, May 13, 2003 at 12:05:07PM -0400, Mike Dresser wrote: > Reminds me of a "bug" in the old Icon systems that the schools used > in the early 80's or so. The immutable(+i) flag couldn't be removed, > even by the superuser because then you'd be modifying the file, which > wasn't allowed cause

Re: can touch(1) readonly files

2003-05-13 Thread Branden Robinson
On Tue, May 13, 2003 at 11:10:26PM +1000, Russell Coker wrote: > Bernd is correct. It's a kernel issue. > > SE Linux allows you [...] > > SE Linux allows control [...] Russell, you are such a pimp. ;-) -- G. Branden Robinson| To stay young requires unceasing Debian GNU/L

Re: can touch(1) readonly files

2003-05-13 Thread Mike Dresser
On Tue, 13 May 2003, Paul Jarc wrote: > No, the file's metadata is stored in its own inode. But its > permission bits affect access only to its data, not to its metadata. > Metadata is always writable by the owner - otherwise you wouldn't be > able to restore your own write access after removing

Re: can touch(1) readonly files

2003-05-13 Thread Paul Jarc
Wouter Verhelst <[EMAIL PROTECTED]> wrote: > You can only do that if you have write permissions to the directory the > file is in; if not: > > [EMAIL PROTECTED]:/usr$ touch -d 'next year' doc; ls -ld doc . > touch: setting times of `doc': Operation not permitted > drwxr-xr-x 16 root root

Re: can touch(1) readonly files

2003-05-13 Thread Russell Coker
On Tue, 13 May 2003 21:53, Bernd Eckenfels wrote: > On Tue, May 13, 2003 at 04:59:24PM +0800, Dan Jacobson wrote: > > But how can I protect _myself_ from _myself_? > > Protection from yourself, especially if you are root are extended Unix > features (like for example immutable and append only files

Re: can touch(1) readonly files

2003-05-13 Thread Bernd Eckenfels
On Tue, May 13, 2003 at 04:59:24PM +0800, Dan Jacobson wrote: > But how can I protect _myself_ from _myself_? you cant, since you always can change the permissions of the file back to writeable. Protection from yourself, especially if you are root are extended Unix features (like for example immu

Re: can touch(1) readonly files

2003-05-13 Thread Dan Jacobson
But how can I protect _myself_ from _myself_? I seem to recall in past UNIXes things weren't this "bad". $ id uid=1000(jidanni) gid=1000(jidanni) ... $ chmod -w -R ee $ find ee|xargs touch -d 'next year' $ find ee|xargs ls -ld dr-xr-xr-x3 jidanni jidanni 1024 2004-05-13 16:43 ee -r--r--r-

Re: can touch(1) readonly files

2003-05-12 Thread Bernd Eckenfels
On Tue, May 13, 2003 at 03:02:05AM +0200, Wouter Verhelst wrote: > > $ chmod -w f; touch -d 'next year' f; ls -l f > > -r--r--r-- 1 jidanni jidanni 666 2004-05-13 03:02 f > > You can only do that if you have write permissions to the directory the > file is in; if not: which is not quite true: ga

Re: can touch(1) readonly files

2003-05-12 Thread Wouter Verhelst
On Tue, May 13, 2003 at 03:10:58AM +0800, Dan Jacobson wrote: > Gentlemen, what's the deal where one can change the dates on read-only files? > $ chmod -w f; touch -d 'next year' f; ls -l f > -r--r--r-- 1 jidanni jidanni 666 2004-05-13 03:02 f You can only do that if you have write permissions to