Re: How to change the Owner of a file





gustav@xxxxxxxxxxxxxx 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 :$!";
}

chown $uid, $gid, $filename or 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

You must be have permission to chown the file and apparently you don't so you need to either:


a) run the script as a user that does have permission
b) ask whoever has permission of it to give you a copy or loosen its permissions for you.


The whole idea of permissions is to not let changes (IE chmod) be doen to a file by people who are nto allowed (IE you)
.




Relevant Pages

  • Re: editing licensed shows
    ... You can do almost anything with CHESS if you get permission. ... the first productions done after Broadway was by the Long Beach Civic ... The script was very much changed by director ...
    (rec.arts.theatre.musicals)
  • RE: Help needed setting user security rights through a script
    ... 'this script will set permission on given folder... ... 'Folder on which permissions will be applied, ... 'users:C means "Users" group will be assigned Change permission. ... > install or uninstall applications. ...
    (microsoft.public.windows.server.scripting)
  • Re: User Account Security
    ... Better post this under the original posting, so that anybody could follow it and find it again. ... after some times about 30 minutes all permission changed with other ... I created a script and disabled this settings ... the password you add two deny ACE's to the DACL. ...
    (microsoft.public.windows.server.active_directory)
  • RE: Permission Denied 800A0046 GetObject
    ... Actually I got the script working via a text file containing the names of the ... For Each strComputer In arrComputers ... Set colIESettings = objWMIService.ExecQuery _ ... > and I get an error 800A0046 Permission Denied error on GetObject...now I get ...
    (microsoft.public.windows.server.scripting)
  • Re: Question for Script of users permission.
    ... BUT AS I AM USING THE SCRIPT ON THE MSDE FOR THE LOGIN ... AND PERMISSION OF USERS. ... >> As i have only one SQL server I have check the same on ...
    (microsoft.public.sqlserver.security)