Permission denied when copying a read-only file in a FlexCache volume using NFSv4.1
Applies to
- ONTAP 9
- NFSv4.1
- FlexCache
Issue
Standard (non-root) users receive a "Permission denied" error when attempting to copy read-only files in a FlexCache volume using NFSv4.1, but are successful when using NFSv3 or NFSv4.0
Example:
[usr1@client1 ~]# sudo mount -t nfs -o vers=4.1,sec=sys svm1:/cache /mnt/cache [usr1@client1 ~]# cd /mnt/cache [usr1@client1 cache]$ echo hi > test [usr1@client1 cache]$ ls -al total 4 drwxrwxrwx. 2 root root 4096 May 4 12:48 . drwxr-xr-x. 7 root root 109 May 4 08:53 .. -rw-r--r--. 1 usr1 grp1 3 May 4 12:48 test [usr1@client1 cache]$ [usr1@client1 cache]$ cp test test1 [usr1@client1 cache]$ ls -al total 4 drwxrwxrwx. 2 root root 4096 May 4 12:48 . drwxr-xr-x. 7 root root 109 May 4 08:53 .. -rw-r--r--. 1 usr1 grp1 3 May 4 12:48 test -rw-r--r--. 1 usr1 grp1 3 May 4 12:48 test1 [usr1@client1 cache]$ [usr1@client1 cache]$ chmod 444 test [usr1@client1 cache]$ ls -al total 4 drwxrwxrwx. 2 root root 4096 May 4 12:48 . drwxr-xr-x. 7 root root 109 May 4 08:53 .. -r--r--r--. 1 usr1 grp1 3 May 4 12:48 test -rw-r--r--. 1 usr1 grp1 3 May 4 12:48 test1 [usr1@client1 cache]$ [usr1@client1 cache]$ cp test test2 cp: cannot create regular file 'test2': Permission denied [usr1@client1 cache]$ ls -al total 4 drwxrwxrwx. 2 root root 4096 May 4 12:49 . drwxr-xr-x. 7 root root 109 May 4 08:53 .. -r--r--r--. 1 usr1 grp1 3 May 4 12:48 test -rw-r--r--. 1 usr1 grp1 3 May 4 12:48 test1 -r--r--r--. 1 usr1 grp1 0 May 4 12:49 test2 [usr1@client1 cache]$