<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting into NFS4 and Kerberos : chown files and folders in ONTAP Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167572#M38396</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you work on TR and your reply here !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my understanding (but I obviously could be wrong...) kinit was not yet necessary at this point !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Connected as local root on my machine&lt;/LI&gt;&lt;LI&gt;Having a machine Kerberos ticket (klist -ke) MYMACHINE$@MY.REALM&lt;/LI&gt;&lt;LI&gt;Having&amp;nbsp; a name-mapping rule to transform (.+)\$@MY.REALM&amp;nbsp; to root&lt;/LI&gt;&lt;LI&gt;Having an export-policy allowing 0.0.0.0 with KRB5* and Super-User Access&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I should be "root" on my volume and able to do anything I want ? (mkdir/rmdir/touch/cat/.....)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The chown-mode in my vserver is set to use_export_policy&lt;/P&gt;&lt;P&gt;The chown-mode in my export-policy is set to restricted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the &lt;A href="https://docs.netapp.com/ontap-9/topic/com.netapp.doc.dot-cm-cmpr-980/vserver__export-policy__rule__show.html" target="_self"&gt;documentation&lt;/A&gt; :&amp;nbsp;&lt;SPAN&gt;The setting can either allow only the root (with value&amp;nbsp;&lt;/SPAN&gt;restricted&lt;SPAN&gt;) or all users (with value&amp;nbsp;&lt;/SPAN&gt;unrestricted&lt;SPAN&gt;) to change file ownership provided the on-disk permissions allow the operation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example, the volume could host home directories. root should be able to chown directories to users, but not all users ? Let's test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;MyCluster::*&amp;gt; export-policy rule modify -vserver SVM_NFS4 -policyname default -ruleindex 1 -chown-mode unrestricted&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;But still "Invalid argument"&amp;nbsp; when trying to chown a file/folder.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;If I su as &lt;A href="mailto:myUser@MY.REALM" target="_blank" rel="noopener"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;and kinit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;I can create dirs/files on the mounted volume, but everything file/dir is mapped to nobody/???&amp;nbsp; :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;drwxr-xr-x 2 65534 4294967294 4096 juin &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;9 10:11 test5&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I might be missing something in the NFS4 design...&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;GS.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 08:14:07 GMT</pubDate>
    <dc:creator>StockageUGA</dc:creator>
    <dc:date>2021-06-09T08:14:07Z</dc:date>
    <item>
      <title>Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167522#M38391</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;Following the excellent guide &lt;A href="https://www.netapp.com/pdf.html?item=/media/19384-tr-4616.pdf" target="_self"&gt;TR-4616&lt;/A&gt; by&amp;nbsp;&lt;a href="https://community.netapp.com/t5/user/viewprofilepage/user-id/11621"&gt;@parisi&lt;/a&gt;&amp;nbsp;we managed to configure a test environment for NFS4 + Kerberos&lt;/P&gt;&lt;P&gt;We have :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Active Directory KDC (Windows 2016) renamed "MY.REALM" in the next few lines&lt;/LI&gt;&lt;LI&gt;Netapp 9.8P4 SVM (SVMP_NFS4) with configured REALM interface, NFS/ SPN, name-mapping, etc. as described in TR-4616&lt;/LI&gt;&lt;LI&gt;volume (unix security-style) exported via default export-policy allowing every access for krb5* protocols&lt;/LI&gt;&lt;LI&gt;Debian 10 client joined to the domain with a valid ticket (klist -ke with good SPN, aes ciphers, etc.)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;So far, we managed to mount an NFS4 export through fstab file using the machine Kerberos ticket.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Navigating through the mounted directory as (local) root user is ok, can mkdir/touch/rmdir/etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now we would like to interact with ActiveDirectory Users.&lt;/P&gt;&lt;P data-unlink="true"&gt;# id &lt;A href="mailto:myUser@MY.REALM" target="_blank"&gt;myUser@MY.REALM &lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;gives the identity of myUser in AD mapped by idmapd&lt;/P&gt;&lt;P data-unlink="true"&gt;# su &lt;A href="mailto:myUser@MY.REALM" target="_blank"&gt;myUser@MY.REALM&lt;/A&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;is also ok.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;I would like to simply chown a folder in my mounted volume to &lt;A href="mailto:myUser@MY.REALM" target="_blank"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;but so far It is not possible (invalid argument error)&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;AFAIUnderstand NFS4/Kerberos (wish me luck) , the Debian Client AND the Netapp System needs to know about &lt;A href="mailto:myUser@MY.REALM" target="_blank"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;to give him access to ressources. (chown included I suppose ?)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to create a Netapp local &lt;EM&gt;unix-user&lt;/EM&gt; myUser and added a &lt;EM&gt;krb-unix name-mapping rule&lt;/EM&gt; to transform &lt;A href="mailto:myUser@MY.REALM" target="_blank"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;to myUser but It does not seem to change anything, still unable to chown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Seems that there is something I do not understand in the NFS4/Kerberos philosophy ! Any help/hints/URLs appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, by advance.&lt;/P&gt;&lt;P&gt;GS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS : no errors shown in event log show, but 2 stranges lines in journalctl when I try to chown&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;jun 08 19:16:28 docnfs4 nfsidmap[834]: &lt;STRONG&gt;key: 0x289f38a4 type: gid value: daemon@MY.REALM timeout 600&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;jun 08 19:16:28 docnfs4 nfsidmap[835]: &lt;STRONG&gt;key: 0x10913ca1 type: user value: 1469534676 timeout 600&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:22:38 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167522#M38391</guid>
      <dc:creator>StockageUGA</dc:creator>
      <dc:date>2025-06-04T10:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167525#M38394</link>
      <description>&lt;P&gt;I don't see the "kinit" by the user in question. Did you run kinit?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One thing I had to do in my lab was set the chown mode to unrestricted on the SVM to allow chown by the user.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;::*&amp;gt; nfs server show -vserver DEMO -fields chown-mode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;vserver chown-mode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;------- -----------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEMO use_export_policy&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;::*&amp;gt; nfs modify -vserver DEMO -chown-mode unrestricted&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once I did that, my results went from this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ chown student1 newdir&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;chown: changing ownership of ‘newdir’: Operation not permitted&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ id&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;uid=1102(prof1) gid=10002(ProfGroup) groups=10002(ProfGroup),48(apache-group),1202(group2),1203(group3),10000(Domain Users)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ chown student1 newdir&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ ls -la | grep newdir&lt;/FONT&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;drwxrwxrwx 2 student1 ProfGroup 4096 Jun 8 14:03 newdir&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 19:24:08 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167525#M38394</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-08T19:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167572#M38396</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you work on TR and your reply here !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my understanding (but I obviously could be wrong...) kinit was not yet necessary at this point !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Connected as local root on my machine&lt;/LI&gt;&lt;LI&gt;Having a machine Kerberos ticket (klist -ke) MYMACHINE$@MY.REALM&lt;/LI&gt;&lt;LI&gt;Having&amp;nbsp; a name-mapping rule to transform (.+)\$@MY.REALM&amp;nbsp; to root&lt;/LI&gt;&lt;LI&gt;Having an export-policy allowing 0.0.0.0 with KRB5* and Super-User Access&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I should be "root" on my volume and able to do anything I want ? (mkdir/rmdir/touch/cat/.....)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The chown-mode in my vserver is set to use_export_policy&lt;/P&gt;&lt;P&gt;The chown-mode in my export-policy is set to restricted&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the &lt;A href="https://docs.netapp.com/ontap-9/topic/com.netapp.doc.dot-cm-cmpr-980/vserver__export-policy__rule__show.html" target="_self"&gt;documentation&lt;/A&gt; :&amp;nbsp;&lt;SPAN&gt;The setting can either allow only the root (with value&amp;nbsp;&lt;/SPAN&gt;restricted&lt;SPAN&gt;) or all users (with value&amp;nbsp;&lt;/SPAN&gt;unrestricted&lt;SPAN&gt;) to change file ownership provided the on-disk permissions allow the operation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my example, the volume could host home directories. root should be able to chown directories to users, but not all users ? Let's test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;MyCluster::*&amp;gt; export-policy rule modify -vserver SVM_NFS4 -policyname default -ruleindex 1 -chown-mode unrestricted&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;But still "Invalid argument"&amp;nbsp; when trying to chown a file/folder.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;If I su as &lt;A href="mailto:myUser@MY.REALM" target="_blank" rel="noopener"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;and kinit.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;SPAN class="Apple-converted-space"&gt;I can create dirs/files on the mounted volume, but everything file/dir is mapped to nobody/???&amp;nbsp; :&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;drwxr-xr-x 2 65534 4294967294 4096 juin &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;9 10:11 test5&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I might be missing something in the NFS4 design...&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;GS.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 08:14:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167572#M38396</guid>
      <dc:creator>StockageUGA</dc:creator>
      <dc:date>2021-06-09T08:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167633#M38403</link>
      <description>&lt;P&gt;If you are using "root" then no need for kinit, as the krb-unix mapping handles that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;But your original question was about a specific user - for that, you'd need to kinit. And there is a krb-unix mapping for USER@DOMAIN.COM&amp;nbsp;to UNIX user USER, but that doesn't require a name mapping rule, provided ONTAP can find the UNIX user named "USER" in name services.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;In my lab, as root, I can chown with the restricted chown-mode set without needing to kinit:&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;::*&amp;gt; nfs show -vserver DEMO -fields chown-mode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;vserver chown-mode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;------- -----------------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEMO use_export_policy&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;::*&amp;gt; export-policy rule show -vserver DEMO -policyname home -fields chown-mode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;vserver policyname ruleindex chown-mode&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;------- ---------- --------- ----------&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DEMO home 1 restricted&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Here's the Kerberos mount:&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 /]# mount -o sec=krb5 demo:/home /mnt/home&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 /]# mount | grep home&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;auto.homedir on /home type autofs (rw,relatime,fd=17,pgrp=1157,timeout=50,minproto=5,maxproto=5,indirect,pipe_ino=971)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;demo:/home on /mnt/home type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=krb5,clientaddr=10.193.67.225,local_lock=none,addr=10.193.67.237)&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;Note that when I create a new file, the owner is root. In your case, the owner is nobody, which is likely why it's failing for you... root is not root there.&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 /]# cd /mnt/home&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 home]# touch newfile&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 home]# ls -la | grep newfile&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-rw-r--r-- 1 root daemon 0 Jun 9 13:04 newfile&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;And I can chown that file as root with no issues:&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 home]# chown prof1 newfile&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;[root@centos7 home]# ls -la | grep newfile&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;-rw-r--r-- 1 prof1 daemon 0 Jun 9 13:04 newfile&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;As a regular user, I can't (because of the restricted chown mode - aka, root-only-chown):&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;# su prof1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ kinit&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Password for prof1@NTAP.LOCAL:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ cd ~&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ mkdir newdir2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ ls -la | grep newdir2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;drwxr-xr-x 2 prof1 ProfGroup 4096 Jun 9 13:09 newdir2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ chown student1 newdir2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;chown: changing ownership of ‘newdir2’: Operation not permitted&lt;/FONT&gt;&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;When I set the export policy to allow it, I can chown with a regular user:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;::*&amp;gt; export-policy rule modify -vserver DEMO -policyname home -ruleindex 1 -chown-mode unrestricted&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ chown student1 newdir2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;sh-4.2$ ls -la | grep newdir2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;drwxr-xr-x 2 student1 ProfGroup 4096 Jun 9 13:09 newdir2&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a homedir setting, you can create a qtree per user and apply individual export policies to those qtrees if you want different levels of access for chown, control for different clients, etc.&lt;/P&gt;&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;P data-unlink="true"&gt;You'd need to look into why root is writing files as "nobody" here; I suspect it's due to how you've set up your krb-unix name mapping or you've set "superuser" to "none" in the export-policy rule and it's getting squashed to the user set in -anon (which is 65534 by default).&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 17:18:39 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167633#M38403</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-09T17:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167647#M38408</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry If was not very clear about my original question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need the local root user to chown a folder to a Kerberos User. Files created by root are mapped root:daemon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;root@docnfs4:~# ll /media/testnfs/&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;drwxr-xr-x 2 root &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;daemon &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;4096 juin &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;8 01:21 test&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;(with ll -n)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;drwxr-xr-x 2 &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;1 4096 juin &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;8 01:21 test&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;And If "su" as &lt;A href="mailto:myUser@MY.REALM" target="_blank" rel="noopener"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;and then kinit and then create a folder, I get nobody:strange&amp;nbsp; :&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;drwxr-xr-x 2 65534 4294967294 4096 juin &lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;9 10:11 test5&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;--&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;In your lab, just to be sure I understand it : prof1 is a local centOS user ? prof1@NTAP.LOCAL is also a Kerberos user ? And I suppose you have a krb-unix mapping rule to transform &lt;A href="mailto:prof1@NTAP.LOCAL" target="_blank" rel="noopener"&gt;prof1@NTAP.LOCAL&lt;/A&gt;&amp;nbsp;to prof1 ? And that you have a local unix-user defined in your SVM named prof1 ? is your local prof1 uid aligned with SVM unix-user prof1 uid ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;Thanks for your time, I will try to deploy a centOS client in parallel.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;GS.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 07:26:51 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167647#M38408</guid>
      <dc:creator>StockageUGA</dc:creator>
      <dc:date>2021-06-10T07:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167654#M38409</link>
      <description>&lt;P&gt;- prof1 is a UNIX user in AD LDAP&lt;/P&gt;&lt;P&gt;- prof1 is also a Windows user in AD (on the same user principal)&lt;/P&gt;&lt;P&gt;- prof1@ntap.local is, by nature if AD, the Kerberos UPN&lt;/P&gt;&lt;P&gt;- I have no krb-unix name mapping because the Windows and UNIX user that ONTAP finds are the same names, so it maps implicitly&amp;nbsp;&lt;/P&gt;&lt;P&gt;- you could create a local UNIX user with the same name in lieu of LDAP&lt;/P&gt;&lt;P&gt;- krb-unix name mapping rules are only needed if the UPN user name and UNIX user name are not identical. (Ie, Windows user john.smith and UNIX name jsmith)&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 13:16:46 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167654#M38409</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-10T13:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167674#M38415</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;&lt;P&gt;I managed to make Debian and CentOS show correct informations. (SSSD and idmapd configuration files)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand your reply correctly, I need to add an AD/LDAP configuration in the ns-switch/passwd database ?&lt;/P&gt;&lt;P&gt;This way, &lt;A href="mailto:myUser@MY.REALM" target="_blank"&gt;myUser@MY.REALM&lt;/A&gt;&amp;nbsp;will be recognized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a workaround, I can create a local UNIX user named myUser !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Starts to make sense &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; (I hope...)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;GS.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 21:34:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167674#M38415</guid>
      <dc:creator>StockageUGA</dc:creator>
      <dc:date>2021-06-10T21:34:07Z</dc:date>
    </item>
    <item>
      <title>Re: Getting into NFS4 and Kerberos : chown files and folders</title>
      <link>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167676#M38416</link>
      <description>&lt;P&gt;AD/LDAP isn't required, but it makes things simpler/more streamlined. Local users should work, too, but if you have a lot of users, you don't want to be creating a ton of&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 22:00:30 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Discussions/Getting-into-NFS4-and-Kerberos-chown-files-and-folders/m-p/167676#M38416</guid>
      <dc:creator>parisi</dc:creator>
      <dc:date>2021-06-10T22:00:30Z</dc:date>
    </item>
  </channel>
</rss>

