How to use chown/chgrp as a normal user to change user-ownership of files
Issue
- We have some applications that are being migrated from UNIX and expect to be able to use
chown
as normal non-root users to change file ownership. This always fails in RHEL with an error message like the following:
chown: changing ownership of `somefile': Operation not permitted
Is there any way to get around this?
- Running chgrp
as a non-root user fails to change the group ownership with the following error message.
chgrp: changing group of `somefile': Operation not permitted
- rsync fails to change the ownership of user/group if used with -a flag.
# rsync -a file1 file2
rsync: chgrp "/test/.file2.wJyVrN" failed: Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at main.c(892) [sender=2.6.8]
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.