On Mon, 2005-10-31 at 13:45 +0530, Rakesh Mishra wrote:
> Hi folks

Hello,

> Can any body tell me how to change the owner of a file ??????
> 
> I have written this script .......
> 
> unless (chown $uid , $gid , $filename)
> {
> die "chown failed :$!";
> }
> 
> this code will give me the error you can't change " permission denied "
> can any body tell me , how to over come this error
> 
I think perl runs with the same authority level as the user account you
are using...  If you have permissions to change file ownership then the
script should work.

Have you tried changing the permissions by hand? (Just to see if you
can!)

So if the above assumption is correct and you can't change the
permissions I would check if you can run the script as root or get sudo
accounts.

Hope that is of some use.


DAn,


> bye
> rakesh
-- 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to