Re: How to change the Owner of a file



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

.



Relevant Pages

  • Re: cant get access to disk share when connecting from a remote s
    ... The systems are DUTs. ... for each of the drives within the system. ... Everything in the scripts work except the file permissions below the shares ... the shares on the DUTs manually, after they run my rename script, but I would ...
    (microsoft.public.windows.server.scripting)
  • Re: VBA Script to Read WMP 11 Database
    ... The script failed on the desktop when I downloaded WMP11, ... Just reviewing the bidding -- WMP 11 responds properly to commands in a VBS ... That's why the computer wouldn't let me manually change the permissions. ... Digital Media MVP: 2004-2007 ...
    (microsoft.public.windowsmedia)
  • Re: VBA Script to Read WMP 11 Database
    ... The script failed on the desktop when I downloaded WMP11, ... Just reviewing the bidding -- WMP 11 responds properly to commands in a VBS ... That's why the computer wouldn't let me manually change the permissions. ... The CREATOR OWNER is likely on windows to be one of the admin accounts ...
    (microsoft.public.windowsmedia)
  • Re: how to restrict users to search in their own Organizational Unit
    ... will be given the necessary permissions. ... Who would you DENY? ... decided a script can make it possible to accomplish, ... If I need to create a security group per OU and then add all users ...
    (microsoft.public.windows.server.active_directory)
  • Re: Running Python scripts under a different user
    ... I would like to know if there is a way to run a Python file under a ... different user account than the one logged in. ... they would have to use my tools, which would control the permissions ... one, is that if the script stops, the locations may retain the writing ...
    (comp.lang.python)