Re: chown and symbolic links



Hi!

: ~2 years ago I was able to chown a symbolic link. Now chown
: modifies the library or any other file the symbolic links
: points to.

It seems I answed this question some time ago.
I guess you are using Linux with 2.2+ kernel now and you used 2.0
kernel ~2 years ago. There is NOTES section from chown (2) man page.

Thank you for figuring this out!

: How do I get the old behavior ?

There is a dirty hack below.

It's funny that some people call their dirty hacks "patches" and you are
calling your patch a "dirty hack".

This seems tdirty hack to me.

local_lchown should be added, and lchown should be added to all
targets... Because .. How do you get functionality of chown() if chown
is turned into lchown?

This is basically what the "chown" command does in GNU fileutils, except
that it returns ENOSYS on symlinks if lchown is not available and chown is
not guaranteed to work as lchown.

It's already the second patch in the last month that tries to use the VFS
level to give the traditional libc functions the "smartness" of the
traditional UNIX utilities, such as "ln" that can link into a directory
and "chown" that works on symlinks.

I think this is bad. I do not like smartness such as this. It is
likely to break stuff in future.
                                                                Pavel
-- 
The best software in life is free (not shareware)!              Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]