NFS wrong file permissions
#1
I use NFS for my sources. I have a Synology NAS (DS212+). My exports file looks like this:

Code:
/volume1/Films        *(rw,async,no_wdelay,insecure,no_root_squash,anonuid=1025,anongid=100)
/volume1/Series        *(rw,async,no_wdelay,insecure,no_root_squash,anonuid=1025,anongid=100)
/volume1/Cabaret    *(rw,async,no_wdelay,insecure,no_root_squash,anonuid=1025,anongid=100)

This works great in XBMC except for when I download a subtitle and want to open it on my PC (ie. by opening the movie). I just can't open it. I noticed the permissions set on files created by XBMC (so through NFS) have the following permissions: -rw-------
While the default permissions set to files when created through a network mount or just through the web interface from the NAS
is: -rw-rw-r--
From what I understand this is the problem. Only the root has rw permissions, but other groups/users have no access.

I looked up the options that can be set in the exports file, like changing root_squash to no_root_squash (as in the above example), but clearly I don't fully understand how NFS works.

How can I set the permissions to rw for everyone for files created through NFS?

edit: I notice this topic might be more suitable in the Linux forum. Apologies if this is the case. My network drives are mounted on different windows PC which can't open the files, so that's why I initially posted it in the Windows forum.
Reply
#2
"ls -al" such a file - it should in now way be owned by root - it should be owned by user with uid 1025 based on your config.

Also you want to use all_squash for forcing all accesses to the uid 1025.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#3
Ah I see how this works now. And you're right. I don't want it to be in root control and it isn't luckely. All accessible files are in the group Users. The actual users are either Transmission, media (one I made myself) or admin. The ones created through NFS have uid/gid 65535.

I changed it to all_squash. A new file is now being made in the group Users (gid 97670) and user named guest. I still can't open files. It still says -rw-------

The uid 1025 must be set by Synology, because I don't remember setting that specific user ID. Same for the gid. In the example from the wiki it seems it's set to 0 for both. But from what I read that isn't wise either. So what must be set here?
Reply
#4
The ones created through nfs have uid/gid 65535? This is a bug on the server then.

The anonuid=1025,anongid=100 parameters in your exports file will make them owned by user with id 1025 (this is on "normal" nfs servers). Also the umask is set to 700 (meaning that on default the permission of files is only granted to the user - nothing for group - nothing for world).

Not much i can help you here. The NFS/Linux on your NAS is broken in a way the manufacturer wants it to be Wink
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
NFS wrong file permissions0