Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to configure with non root user #314

Closed
sachinbanugariya opened this issue Aug 31, 2017 · 9 comments
Closed

not able to configure with non root user #314

sachinbanugariya opened this issue Aug 31, 2017 · 9 comments
Labels

Comments

@sachinbanugariya
Copy link

hello,
i am able to configure glusterfs with root user and all things are working fine.

but there is issue which i need to solve:
at client side i have one directory which having permission of non root user and which files add on that folder is also came with same non root user.

so after replication on server side file permission is changed with non root to 1001 like that.
we want to replicate all client data as it is without change of file permission.

so please can you explain where is the issue and how can i get pure replication as it is with same as client side, with same permission.

maybe i think that is because of glustefs configuration using root user,
so how can i configure glusterfs with non-root user, i tried but getting below error when i try to mount client side with non root user:
/usr/bin/fusermount-glusterfs: mount failed: Operation not permitted

hope i will getting reply ASAP.
thanks.

@thotz
Copy link
Contributor

thotz commented Sep 6, 2017

Actually I didn't understand ur issue completely. If you are disperse/replicated(not jbr) volume the directory created from client side, it should perform parallelly on all the servers. can share the volume info of ur volumes.

@thotz thotz added the Type:Bug label Sep 6, 2017
@sachinbanugariya
Copy link
Author

we want nginx permission everywhere on client side as well as server side.

suppose at client side our directory data is created and given permission of nginx user then mount that directory with server,

so when new files are added at client side data directory which is with permission of nginx user,
so we want that file replicated at server side with same nginx user permission.

thanks

@sachinbanugariya
Copy link
Author

also just i want to know how can i mount my client side data directory with nginx user??

using sudo -u nginx mount xxxx...
it gives this error
/usr/bin/fusermount-glusterfs: mount failed: Operation not permitted

@sachinbanugariya
Copy link
Author

Volume Name: test
Type: Replicate
Volume ID: 76bdbxxx-3358-4aad-xxxe-xxx3447ea0db
Status: Started
Snapshot Count: 0
Number of Bricks: 1 x 2 = 2
Transport-type: tcp
Bricks:
Brick1: 95.xxx.10.xx:/data
Brick2: 95.xxx.10.xx:/data
Options Reconfigured:
auth.allow: 62.xxx.69.xx
transport.address-family: inet
nfs.disable: on

above is my volume info,
thanks.

@thotz
Copy link
Contributor

thotz commented Sep 6, 2017

IMO following should work,

at client side

mount the volume using root.
change the owner and group of "mount point" to nginx

make sure uid of nginx is same across clients/servers

at server side

check whether owner/group of brick path changed accordingly

Then from client side if u create file using nginx user then mount point then it will owner will nginx only

@sachinbanugariya
Copy link
Author

sachinbanugariya commented Sep 6, 2017

ok permission issue is seems because of different UID and GID,
thanks.

but how can i check>>
check whether owner/group of brick path changed accordingly ???

Check at the backend directly(do ls on brick path)

and also want to know how can i mount using nginx user ??

Currently it looks like limitation with gluster, do u really need it?

Jiffin
thanks

@sachinbanugariya
Copy link
Author

Currently it looks like limitation with gluster, do u really need it?

if possible then need,
otherwise its ok, i will able to manage now.
thanks.

@thotz
Copy link
Contributor

thotz commented Sep 7, 2017

I have open upstream bug for this issue(cloned from RHGS). Hence closing this issue

@thotz thotz closed this as completed Sep 7, 2017
@thotz
Copy link
Contributor

thotz commented Sep 7, 2017

Sorry the bug is not valid in glusterfs(seen only in RHGS).
I tried the following (mentioned in https://joejulian.name/blog/mounting-a-glusterfs-volume-as-an-unprivileged-user/) using glusterfs 3.12 it works fine.

On a server:

gluster volume set $VOLUME allow-insecure on

On the client as root:

echo user_allow_other >> /etc/fuse.conf

To mount the volume, you can:

/usr/sbin/glusterfs --log-level=INFO --log-file=my_user_accessable_logfile.log --volfile-id=$VOLUME --volfile-server=$SERVER $MOUNTPOINT

or

use sudo mount command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants