From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) Description of problem: Hi I have linux redhat ent 3 . I have an nfs file system which is on netappliance F760. When as a user I try to operate the command âcp âpâ of a files which the owner is root to the netapp nfs, I get the error: âcp: setting permissions for `./hosts': Operation not permittedâ. A file is created but it is with ownership of root and group other. See example: dmoshes@lsis ~]$ cp -p /etc/hosts . cp: setting permissions for `./hosts': Operation not permitted [dmoshes@lsis ~]$ ls -l hosts -rw-r--r-- 1 root root 458 Jan 26 15:45 hosts Please assist. Version-Release number of selected component (if applicable): coreutils-4.5.3-26 How reproducible: Always Steps to Reproduce: 1.login to a system as a user foo from group boo which is not root 2.check that it has a netapp nfs file system 3.copy a file owned by the root to the netapp nfs file system with "cp -p" Actual Results: I get the error: âcp: setting permissions for `./hosts': Operation not permittedâ. A file is created but it is with ownership of root and group other. Expected Results: It should not give error notice and copy the file with the ownership of the user foo and group boo . Additional info: I have tried to upgrade core utills and it didn't work.
You cannot set file ownership to root as a user. I think the -p option will do what you expect if you run cp as root.
Hi This command should work when a user is operating it.It is users who are working.they cannot work as root.The direction of problem is to the kernel or the coreutils rpm I think.
The command cannot work when a user is operating it, because users cannot arbitrarily set file ownership -- otherwise there would be no point in storing file ownerships in the first instance, since they could all be overridden.