Re: chown: Function not implemented
>>>>> "Jason" == Jason Gunthorpe <jgg@ualberta.ca> writes:
Jason> On Sat, 12 Dec 1998, Mike Schmitz wrote:
>> Some programs act differently according to the name they are
>> called with. Theoretically a program when called by a certain
>> symlink may do something you don't want just anybody doing.
And ownership of the symlink has no effect on that - I can also
*still* do what you're trying to aviod as long as I can create symlinks
*somewhere*.
Jason> Erm, symlinks don't effect permissions so that's not true.
Jason> The reason is simple ownership:
Jason> va{jgg}/tmp#ls -l foo lrwxrwxrwx 1 root root 1 Dec 12 23:42
Jason> foo -> va{jgg}/tmp#rm foo rm: foo: Operation not permitted
Which fails as you note due to the +t on /tmp, otherwise it's the
relevant write attributes on the directory which control your ability
to delete the link. Link ownership is irrelevant.
Jason> Yes this has to do with tmp being +t. Ownership also
Jason> controls who can change the mtime of a file.
However, link mtimes are only meaningful if you're using lstat.
stat/open et al ignore the link's attributes completely.
--
Stephen
---
It should be illegal to yell "Y2K" in a crowded economy. :-) -- Larry Wall
Reply to: