1823064 Members
3211 Online
109645 Solutions
New Discussion юеВ

chgrp: Not owner

 
Ira Manalac
New Member

chgrp: Not owner

I have a filesystem /dbs1 owned by root and group is dba. When I issued "chgrp -R sys /dbs1", it returned "Not owner". I've verified the permission for /usr/bin/chgrp is -r-xr-xr-x. What could have been wrong?
6 REPLIES 6
Thierry Poels_1
Honored Contributor

Re: chgrp: Not owner

hi,
to chgrp a file you need to be the owner of the file or root.
If you didn't execute the chgrp as root, there is probably a file in the /dbs1 tree that does not belong to you.
If you DID execute the chgrp as root, then there's possibly a filesystem NFS-mounted from another system.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Ira Manalac
New Member

Re: chgrp: Not owner

Hi Thierry,

Thanks for the very speedy response. Anyways, I did execute chgrp as root and I've verified thatthere are no NFS-mounted filesystem.

Please advise. Thanks again.

Ira
Thierry Poels_1
Honored Contributor

Re: chgrp: Not owner

hmmmmz :(
can identify exactly where the problem occurs?
try:
chgrp sys /dbs1 (for the directory itself)
chgrp sys /dbs1/* (for the first subdir)
... and maybe further downwards is no errors yet.
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
James R. Ferguson
Acclaimed Contributor

Re: chgrp: Not owner

Hi:

Thierry is correct. In order to change the owner or group, you must own the file and have
the CHOWN privilege.

You could confer this privilege to the "dba" group by using the 'setprivgrp' command. See the man pages (1M) for 'setprivgrp'.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: chgrp: Not owner

Hi:

What does 'getprivgrp -g' return? It should (at least) have:

global privileges: CHOWN

Also: Do you have a file /etc/privgroup ?

...JRF...
Chris Calabrese
Valued Contributor

Re: chgrp: Not owner

Changing ownerships or groups of filesystem mount points can be tricky. Usually you need to have the filesystem unmounted, change the ownerships, and then re-mount. You could play around with changing /dbs1/. and /dbs1/.., which sometimes works (depending on the OS flavor - I don't think I've ever done this with HP-UX).
Brainbench MVP for Unix Administration and Internet Security, SANS Review Editor, and Center for Internet Security HP-UX Benchmark project leader