The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
chown ariec AIX 2 08-14-2007 01:24 PM
chown BG_JrAdmin UNIX for Dummies Questions & Answers 1 05-31-2005 10:47 AM
Chown problem tonydsam UNIX for Dummies Questions & Answers 3 12-02-2004 08:55 AM
chown and permissions ithost UNIX for Dummies Questions & Answers 1 07-03-2003 05:18 AM
chown and NIS Jody UNIX for Dummies Questions & Answers 2 07-01-2003 11:57 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-06-2007
praveenkumar_l's Avatar
Registered User
 

Join Date: May 2007
Posts: 36
chown issue

I have a strange problem in my Linux box (Suse). Recently I took over this box as admin even though I have no prior admin experience. Following is my issue

I had following users under 'root' group initially

user1
user2
user3

Since I did not like user ids under root group. I modifed these user's group to 'users' using

usermod

command. Then I realised that all their files were still under group 'root', so using root id changed their group for all the files recursively using

chgrp -R users <home>

Then after some time, users complained that they could not able to change ower of the files. But claimed they could able to chown earlier

user3 tried the following

$ chown user1 test.sh

and getting the following error

> chown user1 test.sh
chown: changing ownership of `test.sh': Operation not permitted

file test.sh is owned by user3 and under users group

-rwxrwxrwx 1 user3 users 36 2007-05-16 17:50 test.sh

But it is working under root id (I know it should)

Then I changed the group back to root using

> id
uid=1010(iriuser3) gid=0(root) groups=0(root)

> id
uid=1008(iriuser1) gid=0(root) groups=0(root)

Even chgrp is nor working. Giving the same error

Please let me know how to resolve this issue
Reply With Quote
Forum Sponsor
  #2  
Old 06-06-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
Depending on your operating system, either a use can run chown to give ownership of a file to another user or not. Solaris, for example, does not allow chown to be run by any user except root. HP-UX will allow chown run by any user to actually change ownership of a file to another user. What OS are you running?
Reply With Quote
  #3  
Old 06-06-2007
praveenkumar_l's Avatar
Registered User
 

Join Date: May 2007
Posts: 36
Thanks. I am using Suse Linux
Reply With Quote
  #4  
Old 06-06-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Quote:
Originally Posted by blowtorch
Depending on your operating system, either a use can run chown to give ownership of a file to another user or not. Solaris, for example, does not allow chown to be run by any user except root. HP-UX will allow chown run by any user to actually change ownership of a file to another user. What OS are you running?
On Solaris this behavior is tunable on a global basis via the rstchown parameter. HP-UX allows a more fine level of control via the setprivgrp facility.
Reply With Quote
  #5  
Old 06-06-2007
praveenkumar_l's Avatar
Registered User
 

Join Date: May 2007
Posts: 36
Quote:
Originally Posted by Perderabo
On Solaris this behavior is tunable on a global basis via the rstchown parameter. HP-UX allows a more fine level of control via the setprivgrp facility.
What about Linux? I am using Suse Linux
Reply With Quote
  #6  
Old 06-06-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,667
Quote:
Originally Posted by praveenkumar_l
What about Linux? I am using Suse Linux
Depends on the release. Linux is moving toward capabilities with chown controlled by CAP_CHOWN. See:
http://www.die.net/doc/linux/man/man...ilities.7.html
http://www.securityfocus.com/infocus/1400
Reply With Quote
  #7  
Old 06-07-2007
praveenkumar_l's Avatar
Registered User
 

Join Date: May 2007
Posts: 36
Thanks Perderabo. By the way, what is the effect of creating a user id (say user1) with uid=0 (that of root)? Will it cause any issues or system crash?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 10:07 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0