<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 17, 2017 at 1:21 PM, Raghavendra Talur <span dir="ltr"><<a href="mailto:rtalur@redhat.com" target="_blank">rtalur@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Wed, Aug 16, 2017 at 5:52 PM, Ilan Schwarts <<a href="mailto:ilan84@gmail.com">ilan84@gmail.com</a>> wrote:<br>
> Hi,<br>
> So this is a bit odd case.<br>
> I have created 2 servers nodes (running CentOS 7.3)<br>
> From Client machine (CentOS 7.2) I mount to one of the nodes (nfs) using:<br>
> [root@CentOS7286-64 mnt]# mount -t nfs<br>
> L137B-GlusterFS-Node1.L137B-<wbr>root.com:/volume1 /mnt/glustervianfs/<br>
><br>
> When i created (touch) a file over the NFS:<br>
> From Client Machine:<br>
> [revivo@CentOS7286-64 glustervianfs]$ touch nfs3file<br>
> [revivo@CentOS7286-64 glustervianfs]$ id revivo<br>
> uid=2021(revivo) gid=2020(maccabi) groups=2020(maccabi),10(wheel)<br>
><br>
> On Server machine:<br>
> I monitor the file operations at VFS kernel level.<br>
> I receive 1 event of file create, and 2 events of set attribute changes.<br>
> What I see is that root creates the file (uid/gid of 0)<br>
> And then root (also) use chown and chgrp to set security (attribute)<br>
> of the new file.<br>
><br>
> When i go to the glutser volume itself and ls -la,i do see the<br>
> *correct* (2021 - revivo /2020 - revivo) uid/gid:<br>
> [root@L137B-GlusterFS-Node1 volume1]# ls -lia<br>
> total 24<br>
> 11 drwxrwxrwx. 3 revivo maccabi 4096 Aug 10 12:13 .<br>
> 2 drwxr-xr-x. 3 root root 4096 Aug 9 14:32 ..<br>
> 12 drw-------. 16 root root 4096 Aug 10 12:13 .glusterfs<br>
> 31 -rw-r--r--. 2 revivo maccabi 0 Aug 10 12:13 nfs3file<br>
><br>
> Why on the VFS layer i get uid/gid - 0/0<br>
<br>
</div></div>As you have pointed out above, the file is created with 0:0<br>
owner:group but subsequent operations change owner and group using<br>
chown and chgrp. This is because the glusterfsd(brick daemon) process<br>
always runs as root. I don't know the exact reason why setfsuid and<br>
setfsgid are not used although the code exist.<br>
<br>
Amar/Pranith/Raghavendra/<wbr>Vijay,<br>
<br>
Do you know why HAVE_SET_FSID is undefined in line<br>
<a href="https://github.com/gluster/glusterfs/blob/master/xlators/storage/posix/src/posix.c#L65" rel="noreferrer" target="_blank">https://github.com/gluster/<wbr>glusterfs/blob/master/xlators/<wbr>storage/posix/src/posix.c#L65</a><br>
<br></blockquote><div><br></div><div>Its been ~10 years since its disabled in codebase, and I don't recollect why completely right now.<br><br>By checking the patch [1] which got this change, I couldn't make out much: Probably something to do with Solaris support IMO.<br><br>[1] - <a href="https://github.com/gluster/historic/commit/3176ddf99f701412bd799cc730afd598c2a13e39">https://github.com/gluster/historic/commit/3176ddf99f701412bd799cc730afd598c2a13e39</a><br><br></div><div>May be time to run a test by removing that line as we are friendly with only Linux/BSD right now.<br><br></div><div>Regards,<br></div><div>Amar<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Thanks,<br>
Raghavendra Talur<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Amar Tumballi (amarts)<br></div></div></div></div></div>
</div></div>