Operating System - HP-UX
1845868 Members
4318 Online
110250 Solutions
New Discussion

Re: chown HP-UX versus linux

 
SOLVED
Go to solution
Peter Brimacombe
Frequent Advisor

chown HP-UX versus linux

On linux (Redhat) I tried to chown -R a big directory - without success. The sysadmin guy said that only root can chown. I logged in to HP-UX and found that joe average (me) can chown! No big deal, just say'ng.
11 REPLIES 11
Gokul Chandola
Trusted Contributor

Re: chown HP-UX versus linux

Hi,
May I know What Question you have????????

Regards,
Gokul Chandola
There is always some scope for improvment.
Steven Schweda
Honored Contributor

Re: chown HP-UX versus linux

Perhaps Linux and HP-UX are spelled
differently for a reason. On HP-UX:

man chown
man 1M setprivgrp
getprivgrp

Some privilege is normally needed on better
operating systems for a user to shed file
ownership, because it affects disk quotas,
and the new owner might not be entirely
pleased by the free gift.

> I logged in to HP-UX [...]

Behaviors like this might be
OS-version-dependent, too. It seldom hurts
to reveal potentially useful info like that.
Venkatesh BL
Honored Contributor

Re: chown HP-UX versus linux

You could compare the manpages from both systems to see where they deviate.
Sandeep_Chaudhary
Trusted Contributor

Re: chown HP-UX versus linux

i dont think there is big differene as u have experienced. There may be few switches different. but chown -R is quite common
V. Nyga
Honored Contributor

Re: chown HP-UX versus linux

Hi,

'chown -R' should work for your own files only and shouldn't work reverse.
See also 'man chown'.

Volkmar
*** Say 'Thanks' with Kudos ***
dirk dierickx
Honored Contributor

Re: chown HP-UX versus linux

btw; solaris acts the same way as linux does.
rmueller58
Valued Contributor

Re: chown HP-UX versus linux

Pete..

Check to see if SELINUX is being enforced..

I've not had problems with doing the the
chmod and chown -R command on Linux as long as SELINUX is set to Permissive..


use the command
getenforce

it should echo back
Disabled or Permissive

if it says Enforced or Enforcing, you may have to do some work in the SELINUX management tool or disable SELINUX
by doing

setenforce 0

or
chkconfig selinux off
and
service selinux stop


rmueller58
Valued Contributor

Re: chown HP-UX versus linux

if you are not the sysadmin on the box you will not be able to determine the Selinux configuration and will have to ask your admin.
Peter Brimacombe
Frequent Advisor

Re: chown HP-UX versus linux

Thanks everybody especially rex_m

I think that selinux is disabled.

The sysadmin did the chown -R probably in about 3 of 4 seconds so my problem is solved. For me the rule is that on linux you have to be root to do chown.
Matti_Kurkela
Honored Contributor
Solution

Re: chown HP-UX versus linux

On HP-UX, the sysadmin can choose whether or not Joe Average can chown things.

See "man 1m setprivgrp" for details.

For example, if the HP-UX sysadmin wishes to allow only root to chown, then the solution is to add the line:
-n CHOWN
to file /etc/privgroup (creating the file if it does not exist) and run "setprivgrp -f /etc/privgroup", or reboot the system.

The CHOWN privilege seems to be enabled to all users by default, at least on HP-UX 11.11 and maybe 11.23. This is probably for legacy compatibility reasons.

MK
MK
Peter Brimacombe
Frequent Advisor

Re: chown HP-UX versus linux

Matti, on HP-UX the chown privilege is enabled by default. On linux it isn't and I don't think that there is any way to enable it because there is no setprivgrp command.