Android Finding my UID/GID (user UI and Group ID) for NFS
#1
I am new to XBMC, have been trawling the forums the whole night but haven't found the answer - so hope someone in here can help me.

I have connected my XMBC based on Android (G-Box Midnight MX2 with XMBC 13.1 BETA1) to my Synology NAS using NFS. It is working (almost) perfectly, I am able to stream videos, save fanart, manually delete files etc. However, when exporting library to separate files and choosing to overwrite existing files, I get the error "Error writing to folder xxxx" (YES/NO). In the log i see an entry with the error text "CNFSFile::Open: Unable to open file : '//Videoer/3 Film/Action og krigsfilm/The Last Stand (2013).nfo' error : 'open call failed with "NFS: ACCESS denied. Required access rw-. Allowed access r--"'

In my NAS I have done the mapping I need (I think), however it does state that that the UID and GID of the NFS-client must be the same as on the DiskStation.

So what I am looking for, is how to set or see the UID and GID used by XBMC (probably by android).

Any suggestions?
Reply
#2
you need to map the uid on the server side not on the client side - see the wiki nfs link in my signature and look for "anonuid" this is what you want.

else you should be able to attach the android device via usb and issue an "adb shell" and an "id" to see the userid ...
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
Thanks for your reply.

I have tried to follow the Guide to setup NFS (including the setup in SSH), but I still have errors when I export the library in overwrite-mode.
I see the following in the debug-log:

20:46:06 T:1092072664 WARNING: FileNFS::OpenForWrite() called with overwriting enabled! - //Videoer/3 Film/Action og krigsfilm/Cowboys And Aliens.nfo
20:46:06 T:1092072664 ERROR: CNFSFile::Open: Unable to open file : '//Videoer/3 Film/Action og krigsfilm/Cowboys And Aliens.nfo' error : 'open call failed with "NFS: ACCESS denied. Required access rw-. Allowed access r--"'
20:46:06 T:1092072664 ERROR: : Movie nfo export failed! ('nfs://192.168.1.34/volume1/NAS/Videoer/3 Film/Action og krigsfilm/Cowboys And Aliens.nfo')
20:46:06 T:1092072664 ERROR: : Unable to write to 'nfs://192.168.1.34/volume1/NAS/Videoer/3 Film/Action og krigsfilm/'!
20:46:06 T:1092072664 DEBUG: ------ Window Init (DialogYesNo.xml) ------

What I don't understand is, that I have given the box access to read/write and mapped to admin - and in all other situations it is working.

My NFS config for the XBMC is the following:
- Access: Read/Write
- Root squash: Map to admin
- Security: sys (AUTH_SYS)
- Activate async: 'X'
- Allow access from unpriveleged ports: 'X'.

Everything else seems to work:
1) I can stream videos with no problem.
2) XBMC can write new fanart, .nfo etc. to the NAS
3) Using the file exporer on XBMC I am able to manually delete files on the NAS.

Any suggestions as to why only Export with overwrite cant write to the NAS?
Reply
#4
Chown all Files and folders in your Export to "Admin"
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
#5
Thanks very much for the hint.
So I thought that admin would have the most broad access rights and this used Root squash with "Map to admin". I changed this to "No mapping" and it is working.

Thanks!
Reply
#6
You are mixing up filesystem permissions and authentication permissions (done via uid Mapping on nfs) - if you Map all Access to User "Admin" You must also alter the filesystem permissions of your Export and the Files in it so that user "Admin" as proper rights...
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
Finding my UID/GID (user UI and Group ID) for NFS0