[Melbourne-pm] chowning symlinks in perl?

David Dick david_dick at iprimus.com.au
Fri Sep 23 06:42:01 PDT 2005


yeah, that chowns the file pointed to by the symlink, but what how do i 
chown the symlink?

Alfie John wrote:
> sorry... forgot you wanted the actual symlink:
> 
> my $filename = readlink $symlink;
> chown $uid, $gid, $filename;
> 
> Alfie
> 
> On 23/09/2005, at 9:50 PM, Alfie John wrote:
> 
>> how about using Perl's chown function?
>>
>> perldoc -f chown
>>
>> Alfie
>>
>> On 23/09/2005, at 8:03 PM, David Dick wrote:
>>
>>
>>> Can anyone figure out how to do chown a symlink in perl? Not the
>>> referent, but the actual symlink. My best effort so far is
>>>
>>> system("chown user:group symlink");
>>>
>>> but there might be a better way/module?
>>>
>>> uru
>>> -Dave
>>> _______________________________________________
>>> Melbourne-pm mailing list
>>> Melbourne-pm at pm.org
>>> http://mail.pm.org/mailman/listinfo/melbourne-pm
>>>
>>>
>>
>> _______________________________________________
>> Melbourne-pm mailing list
>> Melbourne-pm at pm.org
>> http://mail.pm.org/mailman/listinfo/melbourne-pm
>>
> 
> 


More information about the Melbourne-pm mailing list