gumball60
asked on
Chmod....Operation not permitted
I am trying to change the permissions of an application file(xxx.cfg) permissions from 464 to 466. I am signing into the server with my administrative account. My OS is RHEL 6.4.
ex. chmod 466 xxx.cfg
chmod: changing permissions of ‘.’: Operation not permitted
How can I change the permissions to this file?
ex. chmod 466 xxx.cfg
chmod: changing permissions of ‘.’: Operation not permitted
How can I change the permissions to this file?
ASKER
Here is more info on the file.
ls -lrt xxx.cfg
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
ls -lrt xxx.cfg
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
It sounds like because you are using the wildcard, it is failing on the first item in the directory listing, which is the "." entry, meaning the current directory.
Because it is failing on that entry, perhaps it's not going to the next item, although I would have expected it to continue.
try chmod with the explicit filename:
chmod 466 xxx.cfg
Better yet, to make sure you're root:
su chmod 466 xxx.cfg
Let us know how that goes!
Because it is failing on that entry, perhaps it's not going to the next item, although I would have expected it to continue.
try chmod with the explicit filename:
chmod 466 xxx.cfg
Better yet, to make sure you're root:
su chmod 466 xxx.cfg
Let us know how that goes!
ASKER
No wildcards was used. I was in the directory where the file was located...then entered
chmod 466 xxx.cfg (xxx = filename)
chmod 466 xxx.cfg (xxx = filename)
chown -R -v root xxx.cfg
chgrp -R -v root xxx.cfg
chmod 466 xxx.cfg #(OR su chmod 466 xxx.cfg)
chgrp -R -v root xxx.cfg
chmod 466 xxx.cfg #(OR su chmod 466 xxx.cfg)
You said you are logged in as your administrator account. What exactly is that? There is no administrator other than root by default.
Another problem you might have is it looks like you have a group name that contains spaces. I can see this causing issues as well.
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
Try to change to root and make the changes.
Another problem you might have is it looks like you have a group name that contains spaces. I can see this causing issues as well.
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
Try to change to root and make the changes.
ASKER
duncanb7 The application does not require root to have that level of control.
savonne I noticed the 'domain users" too, that may be part of the problem. I am a administrator with limited root permissions.
I cannot su to root
savonne I noticed the 'domain users" too, that may be part of the problem. I am a administrator with limited root permissions.
I cannot su to root
I am not sure I understand what that means "an administrator with limited root permissions".
Are you using sudo?
Can you do this, run the following command and replace username with your "administrator" username (post results here).
id username
If you are not in the "domain users" group you do not have the correct access to chmod this file.
Are you using sudo?
Can you do this, run the following command and replace username with your "administrator" username (post results here).
id username
If you are not in the "domain users" group you do not have the correct access to chmod this file.
ASKER
eliminated uid, gid numbers....
id myusername
uid =(myusername), gid=(domain_users), group=(domain_users), (today_users), (ns_users), BUILTIN\users
id myusername
uid =(myusername), gid=(domain_users), group=(domain_users), (today_users), (ns_users), BUILTIN\users
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why did you eliminate the UID and GID numbers? Can you also show the output of
cat /etc/group
cat /etc/group
-r--rw-r-- 1 root domain users 22090 Jun05 22:28 xxx.cfg
id myusername
uid =(myusername), gid=(domain_users), group=(domain_users), (today_users), (ns_users), BUILTIN\users
Let's make it clear - this account does not have limited root access. I think you need to be the owner to change the perm.
Have you ask someone with root access to run the same command to rule out a possible permission issue?
A bit late into the game but since no one else mentioned it. Are you sure you're using the right chmod? You might have a PATH that points to another place than the standard for chmod.
ls -l `which chmod`
file `which chmod`
ls -l `which chmod`
file `which chmod`
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
chmod 466 *