Can't change owner and group of a linux file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Can't change owner and group of a linux file
# 1  
Old 06-22-2003
Can't change owner and group of a linux file

Hi,

I don't know how the owner & group of a login file in redhat linux 7.2 changed to bache like,
-rwxr-xr-x 1 bache bache 17740 Jun 20 02:05 login

I am trying to change the owner and group to root by using
#chown root login
#chgrp root login
But i am getting the error
chown: changing ownership of 'login': Operation not permitted

Pl can i know the reason and solution for the same.
I am waiting for your valuable response.

Thanks,
Bache
# 2  
Old 06-22-2003
try doing in in single user mode.
#init S
# 3  
Old 06-22-2003
Quote:
Originally posted by norsk hedensk
try doing in in single user mode.
#init S
I tried in single user mode also, here also same error.
If i copy login file from some other linux m/c whether it will works or not or how to reinstall login package.

Thanks,
bache
# 4  
Old 06-23-2003
chown root:root login

have you tried this one?
# 5  
Old 06-23-2003
Quote:
Originally posted by thomas anderson
chown root:root login

have you tried this one?

root@thambura bin]# chown root:root login
chown: changing ownership of `login': Operation not permitted

[root@thambura bin]# ls -lt login
-rwxr-xr-x 1 bache bache 17740 Jun 20 02:05 login

Same error, Any other method to change
# 6  
Old 06-23-2003
Try the following:

# su - bache
$ cd /bin
$ ls -lt login
-rwxr-xr-x 1 bache bache 17740 Jun 20 02:05 login
$ chown root:root login
$
# 7  
Old 06-26-2003
Quote:
Originally posted by RTM
Try the following:

# su - bache
$ cd /bin
$ ls -lt login
-rwxr-xr-x 1 bache bache 17740 Jun 20 02:05 login
$ chown root:root login
$
Again same error has above
Not working
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Change group and Unmask it to 027 in Linux?

I want to propose a change to the run script environment. This would change the effective group of the wsadmin account to prodview with a umask of 027 before running our services. In linux this can be accomplished by the following #!/bin/ksh # # Original shell # newgrp prodview <<... (1 Reply)
Discussion started by: sindhu puja
1 Replies

2. UNIX for Dummies Questions & Answers

Finding the group owner for a file

How would I find out who the group openers is of a file? For example: > ls -l myfile -rwxr-xr-x 1 myronp hawks 20125 Oct 20 20:50 myfile How do I return just hawks. I could do this with a series of cut or awk, but is there a more direct way. The ls -g is better, but still... (1 Reply)
Discussion started by: Dad4x
1 Replies

3. UNIX for Dummies Questions & Answers

Creating a file where the owner and group is not root

Hi, I'm the root user on my computer, but I'm writing a script that does a lot of file handling. Every time I create a file or directory it automatically requires root privileges. Is there a way I can just create a file that the user can access without a password? For example in my script I... (20 Replies)
Discussion started by: jdilts
20 Replies

4. Cybersecurity

Change file owner

What i did: - logged in with acc1 and created a new user acc2 commands used: useradd and passwd. - Then i logged in acc2. but all the files are owned by acc1. Issue: I try to change the owner of the files using chown command . But it gives me a error message. All i want to do is... (13 Replies)
Discussion started by: TotallyConfused
13 Replies

5. Solaris

setfacl don't change permission on group owner

I try to use setfacl command to change the permission of the group primary it does not accept the command , it really accept but don't change the permission on the group. the point here I read that if I use chmod command on group primary the mask changed, but if I use setfacl mask should not... (0 Replies)
Discussion started by: hard_revenge
0 Replies

6. Shell Programming and Scripting

automatically change owner and group

We have a program that when a new account is created using the webpage it creates a new directory on the linux filesystem for the account. The problem is the process that creates the directory is as root user, as I want ftpuser to be able to login I have to manually login and chown -R the... (1 Reply)
Discussion started by: borderblaster
1 Replies

7. UNIX for Dummies Questions & Answers

How to set the name of the group and the owner while creation of the file?

How to set the name of the group and the owner while creation of the file? -rwxrwxr-x 1 root sys 1202 Dec 5 2002 abc.awk like here i need to set the name of root and sys to xxx xxx Any help is appreciated. Thanks. (2 Replies)
Discussion started by: nehak
2 Replies

8. UNIX for Dummies Questions & Answers

change owner of a file

im running into changing the ownership of a file. I am trying to change the ownership to "system", but it doesn't want to work. I sudo chown system /preferences.plist Password: chown: system: Invalid argument is there a way to read the ownership of a file, something like read chown... (3 Replies)
Discussion started by: CBarraford
3 Replies

9. UNIX for Dummies Questions & Answers

How to change the owner of the file?

How to change the owner of the file? Can I change the owner of file/ files? I am user and not admin.(not logged as root) (1 Reply)
Discussion started by: redlotus72
1 Replies

10. UNIX for Dummies Questions & Answers

owner and group in Linux

I am bit unclear of how Linux was set in the real world, please advise me how it's supposed to be. When I log in as root and do a ls -l, I find: /boot, /, /var, /usr, /tmp, /home, /u01, /u02, /u03 and of of this partition is owned by root and the group also belong to root. Is that the way it's... (1 Reply)
Discussion started by: lapnguyen
1 Replies
Login or Register to Ask a Question