LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-15-2006, 06:21 AM   #1
Stuart65
LQ Newbie
 
Registered: Aug 2006
Location: Frankfurt, Germany
Distribution: SUSE & SLES
Posts: 5

Rep: Reputation: 0
Invalid argument when using cp -p to nfs mount


Hi,

I'm attempting to copy a file to an nfs mounted file system located on another server, I would like to copy the file so that the file attributes are preserved so I'm adding the -p to the cp command. When I do this I receive the following error messages.

saplap06:/usr/sap/EE1/home/ee1adm # ls -al sapmnt_exe.txt
-rw-r--r-- 1 ee1adm sapsys 9514 Aug 14 09:57 sapmnt_exe.txt
saplap06:/usr/sap/EE1/home/ee1adm # cp -p sapmnt_exe.txt /mnt
cp: failed to preserve ownership for `/mnt/sapmnt_exe.txt': Operation not permitted
saplap06:/usr/sap/EE1/home/ee1adm # cp -p sapmnt_exe.txt /sapmnt/EK1/global
cp: setting permissions for `/sapmnt/EK1/global/sapmnt_exe.txt': Invalid argument

The file is being copied to nfs mount points which are mounted as follows.

sapkon01:/sapmnt/EK1/global on /sapmnt/EK1/global type nfs (rw,bg,hard,intr,noacl,addr=140.16.4.75)
saturn:/tmp on /mnt type nfs (rw,addr=140.14.45.83)

This error occurs on all nfs mount configurations I have tried, even on a locally mounted nfs mount point, I can copy the file using cp without switches and then change the attributes manually but this is not a solution.

My question, is this a feature that nfs does not support, a bug or an error in how I'm mounting the file system?

The systems in use are running SLES9 sp2 and sp3.

Thanks and regards,

Stuart Symonds.
 
Old 08-15-2006, 03:53 PM   #2
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora and others
Posts: 757

Rep: Reputation: 145Reputation: 145
Are the uid and gid numbers for user 'ee1adm' and group 'sapsys' the same on both systems? That is, if you type this command on each system, do you get the same results?
Code:
id ee1adm
I'm not positive it's necessary, but I think it is. (And chown would still work even if the numbers are different.)
 
Old 08-15-2006, 06:33 PM   #3
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
My question, is this a feature that nfs does not support, a bug or an error in how I'm mounting the file system?
None of the above. NFS supports that feature but you can't do anything from the client side.

You typically can't chown a file on a NFS remote file-sytem, as root is mapped to "nobody", which has no superusers rights.

On the NFS server side, it is possible to allow real root access from a list of machines by using a dedicated option ("root=access list" on Solaris share_nfs), you can also, if you like living dangerously, allow root from any machine (anon=0)

Last edited by jlliagre; 08-15-2006 at 06:35 PM.
 
Old 08-16-2006, 03:23 AM   #4
Stuart65
LQ Newbie
 
Registered: Aug 2006
Location: Frankfurt, Germany
Distribution: SUSE & SLES
Posts: 5

Original Poster
Rep: Reputation: 0
Thumbs up

Thankyou both for the help and prompt reply, the issue is now resolved.

Thanks again, Stuart
 
Old 08-16-2006, 03:26 AM   #5
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
How was it resolved ?
 
Old 08-16-2006, 03:39 AM   #6
Stuart65
LQ Newbie
 
Registered: Aug 2006
Location: Frankfurt, Germany
Distribution: SUSE & SLES
Posts: 5

Original Poster
Rep: Reputation: 0
Hi jlliagre,

Resolved by implementing an access control list as you suggested.

Now I understand the problem I've tested a solution on a SLES system with the following configured in exports.

/tmp saplap06(rw,no_root_squash,sync)

The mount the user wants configured is on a Sun Solaris system which I have no access too. Its up to the sysadmin for that system to configure the export, from your post I gather the syntax is different for Solaris systems.

Regards, Stuart
 
Old 08-16-2006, 03:44 AM   #7
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Indeed, thanks for sharing.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accept(): Invalid Argument bonhomme Programming 6 07-14-2012 10:12 PM
alsamixer invalid argument subaruwrx Linux - Software 1 03-12-2005 01:34 PM
Can't mount ext3 (Invalid argument) Mikessu *BSD 6 06-30-2004 09:05 PM
Mount Failed: Invalid Argument BoboBrazil Linux - Software 4 07-13-2003 12:57 PM
xawtv - invalid argument liguorir Linux - Software 0 06-17-2003 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration