https://tracker.ceph.com/https://tracker.ceph.com/favicon.ico2016-06-17T17:49:56ZCeph CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=729742016-06-17T17:49:56ZGreg Farnumgfarnum@redhat.com
<ul></ul><p>Can you please:<br />1) run ls -lha on the director you're testing in<br />2) do your tests<br />3) run ls -lha on all the relevant pieces<br />4) paste that output</p>
<p>It'll make it a lot easier to see what pieces are going wrong. :)</p> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=729752016-06-17T17:50:17ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Need More Info</i></li></ul> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=730262016-06-20T08:55:30ZKenneth Waegemankenneth.waegeman@ugent.be
<ul></ul><p>I have ceph mounted under /mnt/nfs/ceph: <br />[root@test2202 test]# pwd<br />/mnt/nfs/ceph/test<br />[root@test2202 test]# ls <del>hal<br />total 1.5K<br />drwxr-xr-x 1 root root 4 Jun 20 10:48 .<br />drwxr-xr-x 3 root root 0 Jun 17 16:44 ..<br />drwx-----</del> 1 kwaegema users 0 Jun 16 17:24 roto<br />drwxr-xr-x 1 kwaegema users 0 Jun 17 11:22 testtest<br />[root@test2202 test]# touch mail1<br />touch: setting times of `mail1': Permission denied<br />[root@test2202 test]# mkdir mail2<br />[root@test2202 test]# ls <del>alh<br />total 2.0K<br />drwxr-xr-x 1 root root 4 Jun 20 10:48 .<br />drwxr-xr-x 3 root root 0 Jun 17 16:44 ..<br />-rw-r--r-</del> 1 root root 0 Jun 20 10:49 mail1<br />drwxr-xr-x 1 root root 0 Jun 20 10:49 mail2<br />drwx------ 1 kwaegema users 0 Jun 16 17:24 roto<br />drwxr-xr-x 1 kwaegema users 0 Jun 17 11:22 testtest<br />[root@test2202 test]# echo "Add something to file" > mail3<br /><del>bash: mail3: Permission denied<br />[root@test2202 test]# ls -alh<br />total 2.0K<br />drwxr-xr-x 1 root root 0 Jun 20 10:51 .<br />drwxr-xr-x 3 root root 0 Jun 17 16:44 ..<br />-rw-r--r-</del> 1 root root 0 Jun 20 10:49 mail1<br />drwxr-xr-x 1 root root 0 Jun 20 10:49 mail2<br /><del>rw-r--r-</del> 1 root root 0 Jun 20 10:51 mail3<br />drwx------ 1 kwaegema users 0 Jun 16 17:24 roto<br />drwxr-xr-x 1 kwaegema users 0 Jun 17 11:22 testtest<br />[root@test2202 test]# rm <del>rf testtest<br />[root@test2202 test]# ls -alh<br />total 1.5K<br />drwxr-xr-x 1 root root 0 Jun 20 10:51 .<br />drwxr-xr-x 3 root root 0 Jun 17 16:44 ..<br />-rw-r--r-</del> 1 root root 0 Jun 20 10:49 mail1<br />drwxr-xr-x 1 root root 0 Jun 20 10:49 mail2<br /><del>rw-r--r-</del> 1 root root 0 Jun 20 10:51 mail3<br />drwx------ 1 kwaegema users 0 Jun 16 17:24 roto</p>
<p>I also asked this at the Ganesha mailing list. We are setting the anonymous id to -2, which it seems triggers this: <br /><a class="external" href="https://github.com/nfs-ganesha/nfs-ganesha/issues/102">https://github.com/nfs-ganesha/nfs-ganesha/issues/102</a></p>
<p>I will retry with the workaround they provided for now.</p> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=730282016-06-20T08:56:36ZKenneth Waegemankenneth.waegeman@ugent.be
<ul></ul><p>Now easier to read:</p>
<pre>
[root@test2202 test]# pwd
/mnt/nfs/ceph/test
[root@test2202 test]# ls -hal
total 1.5K
drwxr-xr-x 1 root root 4 Jun 20 10:48 .
drwxr-xr-x 3 root root 0 Jun 17 16:44 ..
drwx------ 1 kwaegema users 0 Jun 16 17:24 roto
drwxr-xr-x 1 kwaegema users 0 Jun 17 11:22 testtest
[root@test2202 test]# touch mail1
touch: setting times of `mail1': Permission denied
[root@test2202 test]# mkdir mail2
[root@test2202 test]# ls -alh
total 2.0K
drwxr-xr-x 1 root root 4 Jun 20 10:48 .
drwxr-xr-x 3 root root 0 Jun 17 16:44 ..
-rw-r--r-- 1 root root 0 Jun 20 10:49 mail1
drwxr-xr-x 1 root root 0 Jun 20 10:49 mail2
drwx------ 1 kwaegema users 0 Jun 16 17:24 roto
drwxr-xr-x 1 kwaegema users 0 Jun 17 11:22 testtest
[root@test2202 test]# echo "Add something to file" > mail3
-bash: mail3: Permission denied
[root@test2202 test]# ls -alh
total 2.0K
drwxr-xr-x 1 root root 0 Jun 20 10:51 .
drwxr-xr-x 3 root root 0 Jun 17 16:44 ..
-rw-r--r-- 1 root root 0 Jun 20 10:49 mail1
drwxr-xr-x 1 root root 0 Jun 20 10:49 mail2
-rw-r--r-- 1 root root 0 Jun 20 10:51 mail3
drwx------ 1 kwaegema users 0 Jun 16 17:24 roto
drwxr-xr-x 1 kwaegema users 0 Jun 17 11:22 testtest
[root@test2202 test]# rm -rf testtest
[root@test2202 test]# ls -alh
total 1.5K
drwxr-xr-x 1 root root 0 Jun 20 10:51 .
drwxr-xr-x 3 root root 0 Jun 17 16:44 ..
-rw-r--r-- 1 root root 0 Jun 20 10:49 mail1
drwxr-xr-x 1 root root 0 Jun 20 10:49 mail2
-rw-r--r-- 1 root root 0 Jun 20 10:51 mail3
drwx------ 1 kwaegema users 0 Jun 16 17:24 roto
</pre> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=730582016-06-20T19:57:20ZGreg Farnumgfarnum@redhat.com
<ul></ul><p>Yeah, I expect that Frank's report is the root cause, but wanted to see to make sure. :)</p> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=730622016-06-20T20:12:43ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Subject</strong> changed from <i>Ganesha CEPH FSAL root squash not working as expected</i> to <i>libcephfs: UID parsing breaks root squash (Ganesha FSAL)</i></li><li><strong>Status</strong> changed from <i>Need More Info</i> to <i>12</i></li></ul> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=732432016-06-23T11:59:36ZKenneth Waegemankenneth.waegeman@ugent.be
<ul></ul><p>I don't know if I should open a new issue for this, but it looks like even with another ID something is still wrong:</p>
<p>I am able to write files as the nobody user or any user in directories of other users, without having write permission<br /><pre>
[root@test2202 vsc40035]# ls -al
total 1
drwxr-xr-x 1 vsc40035 vsc40035 0 Jun 23 13:46 .
drwxr-xr-x 3 root root 0 Jun 23 13:50 ..
[root@test2202 vsc40035]# touch hola
[root@test2202 vsc40035]# ls
hola
[root@test2202 vsc40035]# ls -al
total 1
drwxr-xr-x 1 vsc40035 vsc40035 0 Jun 23 13:51 .
drwxr-xr-x 3 root root 0 Jun 23 13:50 ..
-rw-r--r-- 1 2147483647 2147483647 0 Jun 23 13:51 hola
[root@test2202 vsc40035]# echo whut > hola
[root@test2202 vsc40035]# cat hola
whut
[root@test2202 vsc40035]# ls -al
total 1
drwxr-xr-x 1 vsc40035 vsc40035 0 Jun 23 13:51 .
drwxr-xr-x 3 root root 0 Jun 23 13:50 ..
-rw-r--r-- 1 2147483647 2147483647 5 Jun 23 13:52 hola
[root@test2202 ~]# su - kwaegema
[kwaegema@test2202 ~]$ cd /mnt/nfs/ceph/offload/vsc40035/
[kwaegema@test2202 vsc40035]$ touch hehe
[kwaegema@test2202 vsc40035]$ ls -al
total 1
drwxr-xr-x 1 vsc40035 vsc40035 5 Jun 23 13:54 .
drwxr-xr-x 3 root root 0 Jun 23 13:50 ..
-rw-r--r-- 1 kwaegema users 0 Jun 23 13:58 hehe
-rw-r--r-- 1 2147483647 2147483647 5 Jun 23 13:52 hola
</pre></p> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=734242016-06-27T13:50:29ZJohn Sprayjcspray@gmail.com
<ul><li><strong>Assignee</strong> set to <i>Greg Farnum</i></li></ul> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=735602016-06-29T01:11:57ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Status</strong> changed from <i>12</i> to <i>In Progress</i></li></ul><p>My basic approach here is to just stop automatically setting UID/GID within the Client class code base at all. It currently has get_uid() and get_gid() functions it uses ubiquitously; I'm exposing those externally as pick_my_(uid|gid) and am walking my way through the header file getting rid of all the default-set uid/gid params and adjusting the callers to invoke these pickers instead. fuse_ll.cc, libcephfs.cc, and SyntheticClient are all fine making those calls; anybody who is passing down a negative value presumably knows what they're doing.</p>
<p>BUT: I am not at all sure we do the right thing server-side with negative UID/GID values. That's going to be a whole separate thing.</p> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=744992016-07-13T00:53:56ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Category</strong> changed from <i>44</i> to <i>Correctness/Safety</i></li><li><strong>Component(FS)</strong> <i>Client, Common/Protocol, Ganesha FSAL, MDS, ceph-fuse</i> added</li></ul> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=789362016-09-24T03:14:22ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Fix Under Review</i></li></ul><p><a class="external" href="https://github.com/ceph/ceph/pull/11218">https://github.com/ceph/ceph/pull/11218</a></p> CephFS - Bug #16367: libcephfs: UID parsing breaks root squash (Ganesha FSAL)https://tracker.ceph.com/issues/16367?journal_id=792002016-10-04T05:32:33ZGreg Farnumgfarnum@redhat.com
<ul><li><strong>Status</strong> changed from <i>Fix Under Review</i> to <i>Resolved</i></li></ul>