[Melbourne-pm] chowning symlinks in perl?
David Dick
david_dick at iprimus.com.au
Fri Sep 23 14:13:25 PDT 2005
Daniel Pittman wrote:
> David Dick <david_dick at iprimus.com.au> writes:
>
> You know, it is difficult to follow all this discussion upside down. :)
>
:$
>>yeah, that chowns the file pointed to by the symlink, but what how do i
>>chown the symlink?
>
>
> So far as I know, changing the ownership of a symbolic link, rather than
> what it points to, is a relatively unportable idiom...
thanks for that point, that definitely requires investigation...
> Anyway, the system call you want is 'lchown', which does not follow
> symbolic links. I don't know of anything that exports it by default,
> but you should be able to call it with the syscall interface or find a
> suitable module.
>
and now that i know what to look for, there is of course, on CPAN,
http://search.cpan.org/dist/Lchown/Lchown.pm. :) thanks muchly for the
pointer.
uru
-dave
More information about the Melbourne-pm
mailing list