Trouble with .tar creation over NFS mount

Hello,

I am trying to backup a directory to an NFS mount. But after mounting the "tar" command is failing.

  1. Created folder for mount point: test1
  2. Mounted desired mount:
    [root@server_name1 ~]# mount -t nfs server_name2:/backup/WMSAPP_backup -w /test1/
    [root@server_name1 ~]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup00-LogVolRoot
    19G 14G 4.1G 78% /
    /dev/mapper/VolGroup00-LogVolTmp
    9.5G 3.9G 5.1G 44% /tmp
    /dev/mapper/VolGroup00-LogVolVar
    4.8G 574M 4.0G 13% /var
    /dev/mapper/VolGroup00-LogVolApps
    99G 14G 81G 15% /apps/scope
    /dev/sda1 996M 41M 904M 5% /boot
    tmpfs 7.9G 0 7.9G 0% /dev/shm
    server_name2:/backup/WMSAPP_backup
    1008G 80G 878G 9% /test1

[root@servera-name1 ~]# tar cvf /test1/app_scope.tar /apps/scope/
tar: /test1/app_scope.tar: Cannot open: Permission denied
tar: Error is not recoverable: exiting now

A. Is there a different way of mounting where we can pass credentials. I read somewhere that we do not need credentials to mount as NFS.

B. Is there a different tar option that we can use...

THanks in advance for help.

Well, do you have permissions to access the folder? What's the owner and the group?

Assuming if it is as root I should have permission

I believe you are asking about permission to /test1/
drwxr-xr-x 2 root root 4096 Mar 27 11:59 test1

For the Mount
drwxr-xr-x 16 oracle oinstall 4096 Mar 27 07:00 backup

Try using something other than root, NFS servers may just deny root outright. (being it's a network filesystem, hard to trust things are 'really' root)

You may want to look at the exporting options on the directory from "server-name-2".

You may want to try rw,no_root_squash in /etc/exports which should allow root to act as normal across the share.

I agree with previous poster about RW + no_root_squash. If you dont specify no_root_squash, then by default other system's root will NOT be equal to l
nFS server's root.