Operating System - HP-UX
1823967 Members
4342 Online
109667 Solutions
New Discussion юеВ

Re: changing ownership of file,

 
arun khatwani
Frequent Advisor

changing ownership of file,

hi,

I want to change the owner and group of file will this caommand works

chown (newownername):(newgrpname) filename
4 REPLIES 4
Hemmetter
Esteemed Contributor

Re: changing ownership of file,

Hi,

it is the correct command.
But for security reasons it is allowed only root to change ownership of files.

rgds
HGH


Steven E. Protter
Exalted Contributor

Re: changing ownership of file,

Shalom arun,

The user issuing the chown command must either own the file or be root.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Hemmetter
Esteemed Contributor

Re: changing ownership of file,

Hi,

i think everyone is not allowed to foist a file to someone else .... for sake of security.


rgds
HGH
Dennis Handly
Acclaimed Contributor

Re: changing ownership of file,

Since it is likely you also submitted this to the wrong forum, I've asked the moderators to move it to HP-UX > Sys Admin:
http://forums.itrc.hp.com/service/forums/categoryhome.do?categoryId=156

Basically on HP-UX you can set it so SEP is correct. Or you can set it so HGH is correct.
See CHOWN in setprivgrp(1M).