1833712 Members
2090 Online
110063 Solutions
New Discussion

Cp and mv command issues

 
Satnam Girn
Occasional Contributor

Cp and mv command issues

I have an hpux 11.0 server with an NFS mounted file system from a Novell server using Novell Native File Access (Novell NFS). When copying or moving files into a directory that is within the mounted file system, I get a write permission error for all users except for root. The permissions are all wide open (777) for all directories and sub-directories.

What appears to happen is that the first step in the cp or mv command creates an empty file with the correct name but with no permissions. Then on moving the contents of the file, it fails with:
cp: cannot close ./'filename': Permission denied

Within the directory I can touch, create and edit files and they always come up with the proper permissions which tells me that umask and write priviledges are correct for the ordinary user. Only on the cp and mv commands do I run into problems. Any ideas.
Thanks in advance!
3 REPLIES 3
Shannon Petry
Honored Contributor

Re: Cp and mv command issues

This is not a UNIX issue, but an NFS emulator issue.

FIX:
1. Get a UNIX NFS server and remove all issues completely.
or
2. Call Novell, and pray alot that they can assist with a protocal they are clueless about.
NOTE: This problem, and many others appear with every NFS emulator I have seen. I have never seen a PC product, even from Novell which can emulate NFS properly. Normally, even for basic functions there is so much tooling to be done it's not worth it.

Best bet: Run an NFS server, and use a backup product with agents supporting UNIX.

Regards,
Shannon
Microsoft. When do you want a virus today?
Martin Johnson
Honored Contributor

Re: Cp and mv command issues

Check to see how your Novell NFS is exporting the file system. Remember it is the NFS process on the Novell server that is allowing access to the file system and this can override the permissions on the files and directories in the file system.

HTH
Marty
Satnam Girn
Occasional Contributor

Re: Cp and mv command issues

Thanks for your help. It looks like I can't get away from the Novell NFS server because of our infrastructure so I've had to work around the issue. For now, I have created a script that will:
1)touch 'filename_to_be_copied'
2)chmod 666 'filename_to_be_copied'
3)cp 'original_file' 'filename_to_be_copied'

This works but is obviously not the cleanest method. If I can avoid this customization then I will but your responses have re-affirmed my suspicions that the Novell NFS product is not perfect. Thanks again for your responses.