Bug 1542318
Summary: | dht_lookup_unlink_of_false_linkto_cbk fails with "Permission denied" | |||
---|---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Nithya Balachandran <nbalacha> | |
Component: | distribute | Assignee: | Nithya Balachandran <nbalacha> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | ||
Severity: | high | Docs Contact: | ||
Priority: | unspecified | |||
Version: | mainline | CC: | amukherj, aspandey, atoborek, bturner, bugs, jahernan, jthottan, nbalacha, pkarampu, pousley, rabhat, rhinduja, rhs-bugs, storage-qa-internal, tdesala | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | glusterfs-v4.1.0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | 1540664 | |||
: | 1543016 1543487 (view as bug list) | Environment: | ||
Last Closed: | 2018-06-20 17:59:24 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1540664 | |||
Bug Blocks: | 1543016, 1543487 |
Description
Nithya Balachandran
2018-02-06 05:19:37 UTC
Unprivileged users do not have permissions to delete stale linkto files. Failure to unlink the file causes DHT to return EIO. Steps to reproduce this issue: ============================= 1. gluster volume create vol1 server1:/bricks/brick1/vol1-{1,2} 2. gluster volume start vol1 3. mount -t glusterfs -s server1:/vol1 /mnt/fuse1 # create a file for testing 4. dd if=/dev/urandom of=/mnt/fuse1/FILE-1 count=1 bs=16k 5. gluster volume set vol1 performance.parallel-readdir on #Rename the file in order to create a linkto file 6. mv vol1/FILE-1 vol1/FILE-2 #Force the linkto xattr values to become stale by changing the dht subvols in the graph 7. gluster volume set vol1 performance.parallel-readdir off Fuse mount as a non-privileged user 8. echo user_allow_other >> /etc/fuse.conf 9. gluster volume set vol1 allow-insecure on Create a user user1 10. useradd user1 11: su user1 12. cd /home/user1/ 13. mkdir mymount #Mount the volume as user1 14: glusterfs --log-level=INFO --log-file=my_user_accessable_logfile.log --volfile-id=vol1 --volfile-server=server1 ~/mymount 15: cd mymount/ 16. ls FILE-2 Results: ========= ls: cannot access FILE-2: Input/output error REVIEW: https://review.gluster.org/19508 (cluster/dht: Unlink linkto files as root) posted (#1) for review on master by N Balachandran See Joe Julian's blog for details on how to FUSE mount the volume as a non-privileged user. https://joejulian.name/post/mounting-a-glusterfs-volume-as-an-unprivileged-user/ COMMIT: https://review.gluster.org/19508 committed in master by "N Balachandran" <nbalacha> with a commit message- cluster/dht: Unlink linkto files as root Non-privileged users cannot delete linkto files. However the failure to unlink a stale linkto causes DHT to fail the lookup with EIO and hence prevent access to the file. Change-Id: Id295362d41e52263790694602f36f1219f0646a2 BUG: 1542318 Signed-off-by: N Balachandran <nbalacha> REVIEW: https://review.gluster.org/19524 (tests/dht: Non-root can delete stale linkto files) posted (#1) for review on master by N Balachandran COMMIT: https://review.gluster.org/19524 committed in master by "N Balachandran" <nbalacha> with a commit message- tests/dht: Non-root can delete stale linkto files Test to check that non-root users can delete stale linkto files Change-Id: Ic9bc76bc485cab839927af60cfce78a058eee2e4 BUG: 1542318 Signed-off-by: N Balachandran <nbalacha> This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-v4.1.0, please open a new bug report. glusterfs-v4.1.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution. [1] http://lists.gluster.org/pipermail/announce/2018-June/000102.html [2] https://www.gluster.org/pipermail/gluster-users/ |