Rakesh Mishra wrote:
Hi folks
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

bye
rakesh


Yes, you must the the recipient of the change, unless you have superuser privileges. In other words, you must be $uid. This is because many UNIX systems have quotas on how much data you can store. To "borrow" someone else's capacity, create your file and chown to someone who doesn't have much data stored. If it has read-access for everyone, you can get the file back by copying it. Unfortunately the new version of chown prevent this.

--

Just my 0.00000002 million dollars worth,
   --- Shawn

"Probability is now one. Any problems that are left are your own."
   SS Heart of Gold, _The Hitchhiker's Guide to the Galaxy_

--
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