Bug 43076

Summary: Copying files to nfs home directory copies files as root
Product: [Retired] Red Hat Linux Reporter: Judd Tracy <jtracy>
Component: nfs-utilsAssignee: Pete Zaitcev <zaitcev>
Status: CLOSED WORKSFORME QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: kmaraas
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-03-31 20:46:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Judd Tracy 2001-05-31 15:52:15 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2smp i686)

Description of problem:
When we login to X and start KDE and we don't have a $HOME/Desktop
directory the startkde script will perform cp -aR /etc/skel/Desktop $HOME
but the files are copied over and owned by root.  The script is being run
as the user, and the files in the /etc/skel/Desktop directory are owned by
root.  The NFS server is running on an IRIX box and has the option to
squash root turned on.  I know this sound like an IRIX problem, but the
problem does not happen on IRIX-IRIX, Mandrake7.1-IRIX, or
Redhat7.1-Redhat7.1 transfers.  In each of these cases the files were
copied over with the proper ownership, except mandrake still had the groups
of the files set to root. 

How reproducible:
Always

Steps to Reproduce:
1. Have IRIX nfs server with root_squash turned on.
2. Copy root owned files to IRIX nfs partition using cp -aR dir1 dir2
3.
	

Actual Results:  All of the files that were copied over are owned by root.

Expected Results:  The files should have been owned by the user who copied
them.

Additional info:

% cp -aR /etc/skel/Desktop/ .
cp: setting permissions for `./Desktop/kontrol-panel': Operation not
permitted
cp: setting permissions for `./Desktop/.directory': Operation not permitted
cp: setting permissions for `./Desktop/Linux Documentation': Operation not
permitted
cp: setting permissions for `./Desktop/www.redhat.com': Operation not
permitted
cp: setting permissions for `./Desktop/Printer': Operation not permitted
cp: setting permissions for `./Desktop': Operation not permitted

Even though there are error messages the files are still copied and owned
by root.

This is a possible security problem as setuid root programs could be copied
over and run on the server (atleast in theory)

Comment 1 Bob Matthews 2001-06-04 16:35:17 UTC
What happens if you export the systems from the IRIX box using NFS version 2?

Comment 2 Kjartan Maraas 2003-03-31 20:33:22 UTC
Any new info on this?

Comment 3 Pete Zaitcev 2003-03-31 20:46:25 UTC
Thanks for reminding me, Kjartan. The requestor obviously lost interest,
but I keep such bugs NEEDINFO-ed for a while to give him the last chance.
Closing now.

If you have a bug to report, even with similar symptoms, open a new one.