Bug 1366278

Summary: Unable to mount a gluster volume as non-root user
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Nag Pavan Chilakam <nchilaka>
Component: fuseAssignee: Ravishankar N <ravishankar>
Status: CLOSED WONTFIX QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: amukherj, csaba, nchilaka, rhs-bugs, rtalur, storage-qa-internal, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1489259 (view as bug list) Environment:
Last Closed: 2018-04-16 18:18:42 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: 1489259    
Bug Blocks:    

Description Nag Pavan Chilakam 2016-08-11 13:40:30 UTC
Description of problem:
==========================
as a non-root user i am unable to mount a gluster volume using fuse mount.
Simple USe-case:
I have a common repository of documents in a gluster volume and I want to access it from my desktop .
The only workaround is to mount as root user, but then the non-root user can't access all files due to some files having no such permissions

I even tried a blog
https://joejulian.name/blog/mounting-a-glusterfs-volume-as-an-unprivileged-user/

Version-Release number of selected component (if applicable):
===========
3.7.9-10

How reproducible:
==============
always

Steps to Reproduce:
===================
1.create a distrep/disperse vol
2.try to mount using fuse on you laptop which fails

Comment 2 Ravishankar N 2016-08-11 14:35:48 UTC
1. Have you tried sudo?
2. Are you able to nfs mount a gluster volume as normal user?

Comment 4 Nag Pavan Chilakam 2016-08-11 15:53:05 UTC
Using sudo, means i need to know root password. But I don't want to mount as an admin. Take a simple case of accessing media files from a common repository for thousands of users from their desktop which they would have logged as non-root user.


As Raghavendra already mentioned, we need to think if upcoming technologies like  hyperconvergence and container world may require this.....though i am not able to frame a use case at the moment.

Comment 5 Ravishankar N 2016-08-11 16:37:10 UTC
(In reply to nchilaka from comment #4)
> Using sudo, means i need to know root password.
Not really. If you have been given privileges (/etc/sudoers configuration?), you run the command with *your* password.

Comment 9 Csaba Henk 2017-01-31 06:14:50 UTC
GlusterFS FUSE client uses the "allow_other" mount option which has to be explicitly enabled for non-priviieged users by adding a line of "user_allow_other" to /etc/fuse.conf.

See mount.fuse(8),
http://man7.org/linux/man-pages/man8/mount.fuse.8.html#CONFIGURATION

Please make sure this setting is in place and non-root mount again.

Comment 11 Csaba Henk 2017-08-25 15:18:52 UTC
Still waiting for answer to comment 9 from Nag.

Comment 12 Nag Pavan Chilakam 2017-08-30 06:40:31 UTC
(In reply to Csaba Henk from comment #11)
> Still waiting for answer to comment 9 from Nag.

That too is not working


nag:x:2006:2006::/home/nag:/bin/bash
[root@dhcp35-126 glusterfs]# cat /etc/fuse.conf 
mount_max = 1000
user_allow_other


nag@dhcp35-126 ~]$ mount -t glusterfs 10.70.35.29:testvol testvol/
mount: only root can use "--types" option

Comment 13 Csaba Henk 2017-09-01 19:23:48 UTC
OK, now with the proper fuse.conf, can you please try the method Joe Julian suggested? That should work now.

If it works, is that an acceptable resolution for you?