I had the same problem with a directory, though the problem was that the folder was hosted on an NFS server with root_squash enabled. In that case, if you have root access to the NFS server, just run chown from there.
If you have the same problem but don't have root on the NFS server (only on the client), then (if you are responsible and know what you are doing) an alternative would be to become the user that owns the local folder (sudo su user.name) on the client and then run chown. (Note: becoming the local user might be overstepping your boundary as an admin though so make sure you know what you are doing).
Every "guess" made by other answers is possible. A debugging hint may be to do a strace of the command, and look into the output in order to see what is the real problem in the syscalls itself.
The immutable attribute might be set on the file. Remove it with
Several solution exists, some among them:
I had same problem.
Which was not enough. So i added the 'sa'
Problem solved :)
Funny. Did you check the system logs (/var/log/messages, /var/log/syslog, output of dmesg) for any clues?
Possible reasons:
Try this:
[root@ root]# chattr -ais /bin/ls
after changing the ownership and group back to root.
I had the same problem with a directory, though the problem was that the folder was hosted on an NFS server with
root_squash
enabled. In that case, if you have root access to the NFS server, just runchown
from there.If you have the same problem but don't have root on the NFS server (only on the client), then (if you are responsible and know what you are doing) an alternative would be to become the user that owns the local folder (
sudo su user.name
) on the client and then runchown
. (Note: becoming the local user might be overstepping your boundary as an admin though so make sure you know what you are doing).on what kind of Filesystem is the "ps" file you are trying to chown ? Is the fs mounted as ro (readonly) ?
if you are talking about /bin/ps, on debian it's always like:
Every "guess" made by other answers is possible. A debugging hint may be to do a strace of the command, and look into the output in order to see what is the real problem in the syscalls itself.