user ID (UID) + group ID (GID) management needed for NFS

Discuss with the community any ideas you'd love to see in future DiskStations and DSM updates! We do our best to monitor and forward all of them, but we recommend to also use this form as our team will systematically see your suggestion:
https://www.synology.com/en-global/form ... y/feedback
Forum rules
We do our best to monitor and forward your ideas to our team, but due to the large amount, we may not see every single one and recommend to also use this form as our team will systematically see your suggestion:
https://www.synology.com/en-global/form ... y/feedback

Are you suffering from the UID/GID issue with NFS sharing?

Yes, please make them manageable or introduce NFSv4 with idmapd.
99
99%
No, not at all.
1
1%
 
Total votes: 100
wschlich
I'm New!
I'm New!
Posts: 7
Joined: Sat Apr 23, 2011 12:23 pm
Contact:

user ID (UID) + group ID (GID) management needed for NFS

Postby wschlich » Sat Apr 23, 2011 1:09 pm

Hi!

I just bought a DS1511+ and I am almost happy with it ;)

The only really bad thing is that one cannot influence the UIDs/GIDs it's using/generating.
Thus, using the DS as an NFS server is a real PITA.

There were already many other requests/posting around that issue:

Introduce NIS to accompany NFS, and/or probably LDAP

Add Support to NFS cofig to control UserIDs

User ID control for NFS sharing

webadmin doesn't like UID < 1024?

User uid changes

NFS: Great speed but cant use users mapping: waiting NFSv4

Make it possible to specify UID for new users

sync UID and GID

Update 2011-07-06:
NFS uid/GID mapping

Even QNAP has the same problem, so please show them who is the first to solve it :D

QNAP: Possibility to set UID and GID in User management

Introducing NFSv4 with the rpc.idmapd could be a good solution as well.

Thank you!

Cheers,
Wolfram
Last edited by wschlich on Wed Jul 06, 2011 9:25 am, edited 1 time in total.
chi25
I'm New!
I'm New!
Posts: 1
Joined: Sat Apr 30, 2011 5:49 pm

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby chi25 » Sat Apr 30, 2011 5:56 pm

it's very sad that these NAS servers do not offer UID/GID mapping.
i keep running into situations where files stored on windows via samba cannot be accessed (due to directory permissions) or removed (file permissions) on linux and vice versa.

i have a number of machines here and modifying perms on each and every one of these is not really convenient.
wkechel
I'm New!
I'm New!
Posts: 1
Joined: Thu May 26, 2011 8:25 pm

NFS uid/GID mapping

Postby wkechel » Thu May 26, 2011 8:46 pm

Just bought a couple of DS211+ & DS411. Now we detect an issue with the NFS uid/gid mapping: the synology boxes do not understand map_static in /etc/exports. This renders the disksations useless in NFS environments. This is even worse since adapting the uid/gid on the diskstation below 1024 makes the user/group disappear in the browser based admin interface.
Is there any way to activate uid/gid mapping on the diskstation to support different uid/gid numbers on various nfs clients?
If not, I strongly vote for this extended functionality.

wolfgang
Wolfgang
wschlich
I'm New!
I'm New!
Posts: 7
Joined: Sat Apr 23, 2011 12:23 pm
Contact:

Re: NFS uid/GID mapping

Postby wschlich » Wed Jul 06, 2011 6:09 pm

please vote in viewtopic.php?f=3&t=36539 -- thanks :)
katams
I'm New!
I'm New!
Posts: 1
Joined: Thu Jul 07, 2011 11:54 pm

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby katams » Fri Jul 08, 2011 12:43 am

So this one turned out to be really easy to solve. Apparently Synology does secretly support NFS4.
Just not out of the box.

Warning this instruction is for power-users and expert users only. If you are not comfortable using the command line or vi then please just stick to the regular options on your diskstation.

Logon to the diskstation as root

Code: Select all

ssh root@ds
<type in your root(admin) password when prompted>

backup the file /etc/exports

Code: Select all

cp /etc/exports /etc/exports.orig

open the /etc/exports file in vi

Code: Select all

vi /etc/exports

create a second blank line at the top and copy the first entry upwards
open a newline

Code: Select all

o

command mode

Code: Select all

[esc]

Code: Select all

[down arrow]

visual selection

Code: Select all

v

[right arrow] until the entire line is selected
copy (yank)

Code: Select all

y

[up arrow] to the blank line above
paste

Code: Select all

p

append

Code: Select all

a

then modify the line so it looks like the code line below and contains "fsid=0" after the rw, and is all on one line. There is a [tab] between /volume1 and the ip address
In reality you are just telling nfs who the root of the shares is as NFS4 will automount all the shares under this root.

Code: Select all

/volume1             192.168.1.0/24(rw,fsid=0,async,no_wdelay,no_root_squash,insecure_locks,anonuid=0,anongid=0)

save the file and exit vi

Code: Select all

[esc]:wq


Now reboot the NAS

On Ubuntu you need to change the following:

in /etc/default/nfs-common

Code: Select all

sudo vim /etc/default/nfs-common


append yes to the end of the string NEED_IDMAPD=

Code: Select all

[esc]
/NEED_IDMAPD
[enter]
[right arrow]
stand on the = with your cursor and press

Code: Select all

a

type

Code: Select all

yes

then save the file

Code: Select all

[esc]:wq


make a copy of your fstab (file system table)

Code: Select all

sudo cp /etc/fstab /etc/fstab.orig

then edit your fstab to mount your nas

Code: Select all

vim /etc/fstab
[shift]G
o

paste the following replacing the IP address with your NAS ip address

Code: Select all

192.168.1.26:/  /media  nfs4    rw      0       0

save the file

Code: Select all

[esc]:wq


Now test to make sure your fstab works.

Code: Select all

sudo mount -a


WARNING: IF YOU GET ANY ERROR AFTER TYPING THE sudo mount -a COMMAND STOP!
FIX YOUR FSTAB BEFORE CONTINUING OR RESTORE THE BACKUP FSTAB. NOT DOING SO WILL RENDER YOUR COMPUTER UNBOOTABLE! A LIVE USB-STICK CAN BE USED TO RECOVER THE FSTAB IF ALL GOES AWRY.


open your file browser (such as nautilus)
browse to:
File System
media

you should see all of your shares now under the media folder
they will have all permissions so this method is somewhat less secure than the NFS3 method. But much less hassel with user ID's and permissions.

The other thing you will notice is you don't have any seperate drives on your desktop anymore. The NAS is now integrated in your Ubuntu system.

:D Enjoy

P.S.
Synology if you read this forum, this is a really easy fix to just add the entry in the /etc/exports in your firmware.
danielp
Knowledgeable
Knowledgeable
Posts: 316
Joined: Thu Mar 24, 2011 6:08 am

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby danielp » Fri Jul 08, 2011 3:19 am

Hello,

This function has already been logged as a feature request. Please wait for future DSM releases to see if it has been incorporated in the changelog.
We apologize for the inconvenience and appreciate your inputs.

Regards,
Daniel
**Please do not Private Message me for support questions; leave it on the forum so all members can learn. Thanks!**
Library ~ SynologyWiki ~ Synology FAQ ~ Compatibility Lists
Forum Links ~ Forum Policy ~ 3rd-party forums ~ Help us help you ~ Posting Images
Demo Links ~ DSM GUI ~ Photo Station
Downloads ~ Firmware Downloads ~ Beta Program
Support ~ Support Form ~ Submit Kernel Log ~ Synology eNews
marcvangend
I'm New!
I'm New!
Posts: 4
Joined: Mon Apr 16, 2007 9:43 pm

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby marcvangend » Wed Sep 28, 2011 10:51 am

katams, thanks for taking the time to post your detailed instructions.

I have tried this with an older diskstation (DS107e, running DSM 3.1-1594) and an Ubuntu 11.04 client, but that didn't work. When mounting, I got:

Code: Select all

$ sudo mount -a
mount.nfs4: Protocol not supported

I think this means that my DS does not support nfs4. Can anyone confirm that nfs4 only works with newer models, or did I do something wrong myself?
angel.martin
I'm New!
I'm New!
Posts: 1
Joined: Tue Jan 17, 2012 10:00 am

Re: NFS uid/GID mapping

Postby angel.martin » Mon Feb 13, 2012 11:14 pm

wschlich wrote:please vote in viewtopic.php?f=3&t=36539 -- thanks :)


+1 I voted!! But in the last version DSM 3.2-1958, 20120209. Nothing with my DS212+ :-(

So I can't use NFS + DSM 3.2 if I change uid/gid (uid<1023) from the command line. Please Synology people, we need it.

angel.martin
wschlich
I'm New!
I'm New!
Posts: 7
Joined: Sat Apr 23, 2011 12:23 pm
Contact:

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby wschlich » Sun Jul 28, 2013 1:06 pm

So Synology, will this be fixed in DSM 4.3 which is said to support NFSv4?
wschlich
I'm New!
I'm New!
Posts: 7
Joined: Sat Apr 23, 2011 12:23 pm
Contact:

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby wschlich » Fri Feb 14, 2014 1:07 pm

Synology, what's the current status regarding UID and GID management for NFS?
wschlich
I'm New!
I'm New!
Posts: 7
Joined: Sat Apr 23, 2011 12:23 pm
Contact:

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby wschlich » Thu May 22, 2014 8:31 pm

Synology, can you please comment?
madjpm
I'm New!
I'm New!
Posts: 1
Joined: Wed Jun 04, 2014 5:57 pm

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby madjpm » Wed Jun 04, 2014 6:01 pm

Anything new ?

Can't map my shared folder using uid/gid on my system...


drwxrwxrwx 18 nobody 4294967294 4096 mai 29 18:39 Downloads
jrd
I'm New!
I'm New!
Posts: 1
Joined: Thu Aug 21, 2014 9:14 pm

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby jrd » Thu Aug 21, 2014 9:29 pm

What is the status on this feature? As it stands now it appears as if Synology as a NFS server is nearly useless. I can't control the uid/gid on the client(s) therefore I must set the uid/gid for the user on the Synology to match that of the client. The option in DSM 5 to map NFS users to admin or guest doesn't seem viable because it's essential the original uid/gid be preserved in the file system.
robbo
I'm New!
I'm New!
Posts: 2
Joined: Wed Oct 08, 2014 7:30 pm

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby robbo » Wed Oct 08, 2014 7:48 pm

Any update?

I'm also missing a uid/gid mapping feature, which is a real pain, and almost enough for me put an unhappy smiley here.
douay7battleaxe2
I'm New!
I'm New!
Posts: 1
Joined: Thu Nov 06, 2014 6:37 am

Re: user ID (UID) + group ID (GID) management needed for NFS

Postby douay7battleaxe2 » Thu Nov 06, 2014 6:52 am

I just bought a brand new 415play and got it set up yesterday. After spending a full day trying to get NFS and uid/gid working, I stumbled on this thread, and @katams's Jul 08, 2011 post.

I tried his suggestions several times, removing all shares, adding new shares, manually editing /etc/exports, rebooting, etc.
I've finally concluded that it is simply not possible. Every attempt ends with failure.

3 1/2 years after that post, and numerous complaints from customers before and after that, and Synology *still* does not support a usable NFS solution.

I'm going to use samba/cifs shares on linux for a day or so to measure performance to see if it's worth keeping.

But after a day of frustration, I'm very heavily leaning toward boxing it up and returning it.

Return to “Feature Requests & Product Improvement Suggestions”

Who is online

Users browsing this forum: No registered users and 9 guests