Typically non-root users cannot mount directories.
Running Redhat Have 6GB tar.gz (/dir/somefile.tar.gz) Need to move to a NFS share on another box (//somebox/somefolder/)
We have no other access.
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
mount command can only be executed as root on most Linux systems, because it has a setuid of root set. There are 2 possible work arounds using the
mount command, but they require that the root user (or somebody that can
sudo to root) make some changes.
Have them add an entry to
/etc/fstab for the desired share. The
noauto option is important.
vi /etc/fstab <nfs ip or FQDN>:/ /mnt/ nfs rw,noauto,user,timeo=14,hard,intr 0 0
Then have them run
mount for the desired directory
Add the user to the
suders file, specifying use of the
mount command. Please note that this is less secure, because they can essentially mount anything on the file system. Run
visudo and add a line like this:
afhood ALL=(ALL) /usr/bin/mount
Perform some form of network based copying to the remote file system such as
sftp, etc. The specific command you would use is completely dependent on what the remote system allows and what you have installed on your system.
I'm going to assume that the server is configured to only allow this particular client to connect. Otherwise you could use a client where you did have root access. (How the server identifies this client is something worth questioning too, in a pinch.)
If you must use NFS and don't have root access on the client, then my first thought is to find a userspace NFS client or NFS browser. The only one I've found so far is JFtp, which is a Java GUI client. However, if you're a programmer and so inclined, another option is to roll your own; there is a library called
libnfs1 that you could build from.
I haven't tried either of them, but hopefully this is a start. There may be more out there that I haven't noticed. Finally, beware that the NFS server may require you to connect as root (from a privileged port), in which case you're out of luck.
...Alternately, I just noticed your '//somebox/somefolder/' nomenclature, which is highly unusual for NFS, but standard for SMB (Samba / Windows filesharing), at least on Linux machines. If that's the case, then the tool you want is