06-06-2007
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
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a box that people are using to ssh to our customer sites. Everyone uses an NIS account that I have created for them. I also create home directories for these users as well on this box.
My question is can use a command, like chown, to change ownership of the directories I create to the... (2 Replies)
Discussion started by: Jody
2 Replies
2. AIX
hello
chown not change ownership
before:
205:system ~kuku
chown kuku:system ~kuku
after no change
205:system ~kuku
aix box
can someone help me?
ariec (2 Replies)
Discussion started by: ariec
2 Replies
3. UNIX for Dummies Questions & Answers
Hi
Can anybody please let me know the usage of Chgrp command with an example???
Thanks (1 Reply)
Discussion started by: skyineyes
1 Replies
4. UNIX for Dummies Questions & Answers
hi
i wrote a script to run 'C' executable which will create a new file, after that util is completed, i have to change the file ownership to some other user. for that i used "chown" for changing the file permission in Korn script
:confused:but it is throwing error is "operation... (2 Replies)
Discussion started by: ilayans
2 Replies
5. UNIX for Dummies Questions & Answers
is there a difference in chown on a file or a directory?
how do i chown a directory and all the contents? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies
6. AIX
I'm a owner of directories or files why I can't deliver the ownership of them up to other users? (1 Reply)
Discussion started by: kang
1 Replies
7. Shell Programming and Scripting
I have a file fin2009_4.txt.gz in the unix ftp server. Owner of the file is: ftpusr.
-rw-r--r-- 1 ftpusr sap 0 Feb 19 10:19 fin2009_4.txt.gz
When I try to delete this file after copying to my home folder, I am getting the following error.
rm: fin2009_4.txt.gz1: override... (4 Replies)
Discussion started by: sid1982
4 Replies
8. Solaris
Hello
My oracledatabase creats some xmlfiles. this files has the owner hugo. now I've a script (how runs als hugo2) and this script will insert this XMLFile into the database. But that doesn't work, because the owner of the files is wrong, and hugo has not the rights to insert this files into... (3 Replies)
Discussion started by: Street
3 Replies
9. UNIX for Dummies Questions & Answers
I am trying to change the directory to owner of Sybase. But I get permission denied. I did login as root.
newd1> ls -l
total 58
drwxr-xr-x 2 prod develop 5 Oct 17 06:51 bin
drwxr-xr-x 2 prod develop 7 Oct 17 07:18 etc
dr-xr-xr-x 1 root root 1... (15 Replies)
Discussion started by: samnyc
15 Replies
10. Shell Programming and Scripting
I am working on a test machine.
I just discovered that I have misunderstood the way the following command is run.
chown -Rv some_user:users /some_folder/*This command do exactly what I want. Change the owner of every things from the named folder and in all child folders.
But of course it leave... (13 Replies)
Discussion started by: jcdole
13 Replies
LEARN ABOUT OPENDARWIN
chgrp
CHGRP(1) BSD General Commands Manual CHGRP(1)
NAME
chgrp -- change group
SYNOPSIS
chgrp [-fhv] [-R [-H | -L | -P]] group file ...
DESCRIPTION
The chgrp utility sets the group ID of the file named by each file operand to the group ID specified by the group operand.
The following options are available:
-H If the -R option is specified, symbolic links on the command line are followed. (Symbolic links encountered in the tree traversal
are not followed).
-L If the -R option is specified, all symbolic links are followed.
-P If the -R option is specified, no symbolic links are followed. This is the default.
-R Change the group ID for the file hierarchies rooted in the files instead of just the files themselves.
-f The force option ignores errors, except for usage errors and doesn't query about strange modes (unless the user does not have proper
permissions).
-h If the file is a symbolic link, the group ID of the link itself is changed rather than the file that is pointed to.
-v Cause chgrp to be verbose, showing files as the group is modified.
The -H, -L and -P options are ignored unless the -R option is specified. In addition, these options override each other and the command's
actions are determined by the last one specified.
The group operand can be either a group name from the group database, or a numeric group ID. If a group name is also a numeric group ID, the
operand is used as a group name.
The user invoking chgrp must belong to the specified group and be the owner of the file, or be the super-user.
DIAGNOSTICS
The chgrp utility exits 0 on success, and >0 if an error occurs.
COMPATIBILITY
In previous versions of this system, symbolic links did not have groups.
The -v option is non-standard and its use in scripts is not recommended.
FILES
/etc/group group ID file
SEE ALSO
chown(2), fts(3), group(5), passwd(5), symlink(7), chown(8)
STANDARDS
The chgrp utility is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD
March 31, 1994 BSD