Can't connect to nfs from iPad
#1
First of all, this is absolutely an issue with the way I've configured my NFS server, not with XBMC on iOS.

Because my share is an NTFS volume on a Linux machine (I plan to change this as soon as I can afford new hard drives to copy all the data over) I have had to create my share with the following options:

Code:
192.168.1.0/24(ro,no_root_squash,insecure)

It is my understanding that the only way to access an NTFS volume over NFS is as "root", due to permissions issues with NTFS on *nix. (there is no user "nobody" for NTFSHuh)

I get a "permission denied" error in the XBMC log on my iPad, but I am able to access it perfectly fine from XBMCBuntu.

I tried adding the mapping string for user "mobile" anonuid=501,anongid=501 like this:
Code:
192.168.1.0/24(ro,no_root_squash,insecure,anonuid=501,anongid=501)
...but that doesn't seem to help either.

Does anyone have an idea how to set up this export so that it works from the iPad but doesn't break XBMCBuntu?

Thanks a bunch,

-Wes
Reply
#2
Code:
192.168.1.0/24(ro,all_squash,insecure,anonuid=0,anongid=0)

This will map all accesses regardless of the client user id to id 0 which is root. I for myself didn't get an ntfs partition shared via nfs ever (but its long time ago that i have tried it).
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
(2012-08-09, 15:39)Memphiz Wrote:
Code:
192.168.1.0/24(ro,all_squash,insecure,anonuid=0,anongid=0)

This will map all accesses regardless of the client user id to id 0 which is root. I for myself didn't get an ntfs partition shared via nfs ever (but its long time ago that i have tried it).

Thanks so much for the tip. This works beautifully!

Just to be clear,
Code:
192.168.1.0/24(ro,all_squash,insecure,anonuid=0,anongid=0)
allows access to an NTFS export/share on Linux via NFS, and is accessible from both an iPad 2 and XBMCBuntu running Eden.
Code:
192.168.1.0/24(ro,no_root_squash,insecure)
allows access to the same NTFS export on Linux via NFS, but only from XBMCBuntu. No access from the iPad.

How can I best update the wiki to explain this?

Thanks again,

-Wes
Reply
#4
You don't need to update the wiki. Its because of how userid mapping works (and thats described in the wiki already). I can even explain you why it is that way if you would tell me how you connect to NFS on XBMCBuntu (from within XBMC or mounted in the operating system).
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
(2012-08-14, 10:17)Memphiz Wrote: You don't need to update the wiki. Its because of how userid mapping works (and thats described in the wiki already). I can even explain you why it is that way if you would tell me how you connect to NFS on XBMCBuntu (from within XBMC or mounted in the operating system).

From within XBMC...
Reply
#6
Then i need to know on which user/userid XBMC is running when using XBMCbuntu.
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
#7
(2012-08-14, 16:26)Memphiz Wrote: Then i need to know on which user/userid XBMC is running when using XBMCbuntu.

Thanks for spending the time to help me learn something.

XBMC runs as the user "wes" which is the same user that runs on my NFS "server", id=1000 on both machines.

(had to Google to figure out how to get that info...)

That explains it, huh?

Thanks for adding this great feature to XBMC.

-Wes
Reply
#8
yep. On XBMCbuntu the id 1000 is mapped to id 1000 on the nfsserver.
On iPad the id 501 (mobile) is mapped to id 501 on the nfsserver which didn't have any rights there.

Now we map all IDs to id 0 (root) on the nfs server - because you requested exactly to do this. We could also map all users to id 1000 - just change it to::

Code:
192.168.1.0/24(ro,all_squash,insecure,anonuid=1000,anongid=1000)

This tells nfs to map all ids to user nobody and use id 1000 for user nobody - resulting in mapping all ids to id 1000.
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
#9
That makes sense.

That should work for most normal people Smile

I think the only way to make it work for an NTFS partition is to map it to id 0 like you suggested above.

I think you have to be root in order to access the NTFS partition.

EDIT: No, you don't have to be root, you just can't be "anonymous" or "nobody", as that user doesn't exist on NTFS. You have to "squash" anonymous users to a user that actually exists on the system, and that has permission to access the resource that will be exported via NFS.
Reply
#10
id 0 was not my suggestion it was yours! Since you had it working with XBMCBuntu before my solution it also seems to work with mapping to id 1000 (since thats what happend before the change anyways for XBMCBuntu).
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
#11
(2012-08-15, 11:23)Memphiz Wrote: id 0 was not my suggestion it was yours! Since you had it working with XBMCBuntu before my solution it also seems to work with mapping to id 1000 (since thats what happend before the change anyways for XBMCBuntu).

Well, it was my suggestion but you told me how to do it Smile

It was working with XBMCBuntu with the option "no_root_squash", but not the option "all_squash", until I added "anonuid=0,anongid=0" to the "all_squash" option.

Do you know what the "no_root_squash" option does, exactly?

I thought that it mapped everyone to root, which is the same as "all_squash, anonuid=0,anongid=0", unless I'm misunderstanding something.

-Wes
Reply
#12
no_root_squash would map remote user id to server user id - but would map remot id 0 (root) to the anonuser on the server.

man exports

there this is described...so it does the opposite ... it ensures nothing gets mapped to id 0 Big Grin
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
#13
Would this work for AFP shares to a iPad? If so what would I have to type?
Reply
#14
Don't rape this thread. Make your own. And as a heads up - you should get more in detail what you are meaning. This thread is only valid for NFS.
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
#15
cor sorry mate, was just asking a question after reading this, when the idea pinged in my head..
* iDunc slaps wrists
Reply

Logout Mark Read Team Forum Stats Members Help
Can't connect to nfs from iPad1