Map nfs clients to user

From: CHYRON (DSMITHHFX) 4 Jul 2016 16:10
To: ANT_THOMAS 8 of 20
Never tried SSHFS (actually, never heard of it), but afp is a lot slower than nfs. Fast enough for generic daily r-w usage, but for e.g. backups I use nfs.
EDITED: 4 Jul 2016 16:10 by DSMITHHFX
From: ANT_THOMAS 4 Jul 2016 16:14
To: CHYRON (DSMITHHFX) 9 of 20
Literally SSH Filesystem. I guess pretty much the same as scp but fully mounted rather than individual copy commands.

I found that the encryption slowed things down with scp and big files, but that was on a system with a weak CPU. Changing the encryption type/strength improved speeds significantly. This was also over the internet - dedicated server to home, but I could max the connection over HTTP.
EDITED: 4 Jul 2016 16:18 by ANT_THOMAS
From: CHYRON (DSMITHHFX) 4 Jul 2016 16:28
To: ANT_THOMAS 10 of 20
Quote: 
Literally SSH Filesystem

Ah. Didn't recognize it, I was thinking SS + HFS (for macs). Pretty sure I do use it, to mount the webroot from home (since it doesn't have ftp). Set it up a couple of years ago and forgot/don't think about the network protocol used). Yeah, it is really slow. Good to know you can change that though I doubt I'll ever need to.

EDITED: 4 Jul 2016 16:28 by DSMITHHFX
From: Lucy (X3N0PH0N) 4 Jul 2016 17:12
To: ANT_THOMAS 11 of 20
It's definitely slower (in *theory* at least, I've not actually noticed it being slower and you can choose to specify very weak encryption), yeah. And uses a userspace driver, which is annoying.

I really wish there were a *simple*, *insecure* (I don't care, this is for home use and behind a NAT, I just want it to be fast) file sharing protocol that used a decent driver. Samba's fucking awful, NFS is (ime) flaky and SSHFS is the closest I've found to something that just works and stays working.
From: Lucy (X3N0PH0N) 4 Jul 2016 17:14
To: ANT_THOMAS 12 of 20
Although, yeah, thinking about it, once the keys are open and verified, which should be a one-time thing on a mounted FS, then it's just a case of hashing which modern CPUs can do essentially for free. So maybe it's not actually any slower (I've never actually tested and I kinda don't know what I'm taking about).
EDITED: 4 Jul 2016 17:14 by X3N0PH0N
From: ANT_THOMAS 4 Jul 2016 17:22
To: Lucy (X3N0PH0N) 13 of 20
Just checked, the dedicated server is running an Intel Celeron 220 (nearly 9 years old), no wonder it struggles with regular SSH transfers without tweaking the level of encryption.
From: Lucy (X3N0PH0N) 4 Jul 2016 21:22
To: ANT_THOMAS 14 of 20
:D
From: CHYRON (DSMITHHFX) 6 Jul 2016 14:43
To: Lucy (X3N0PH0N) 15 of 20
I got this working in nfs. It actually is pretty simple, you just have to add anonuid=,anongid= to the export line
Quote: 
anonuid and anongid These options explicitly set the uid and gid of the anonymous account. This option is primarily useful for PC/NFS clients, where you might want all requests appear to be from one user. As an example, consider the export entry for /home/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe).
Quote: 
/home/joe pc001(rw,all_squash,anonuid=150,anongid=100)
http://manpages.ubuntu.com/manpages/wily/man5/exports.5.html
EDITED: 6 Jul 2016 14:45 by DSMITHHFX
From: Lucy (X3N0PH0N) 6 Jul 2016 15:09
To: CHYRON (DSMITHHFX) 16 of 20
Oh that's very handy, thanks!
From: ANT_THOMAS 6 Jul 2016 15:13
To: CHYRON (DSMITHHFX) 17 of 20
That is handy. Love Linux, hate permissions.
From: CHYRON (DSMITHHFX) 6 Jul 2016 15:23
To: ANT_THOMAS 18 of 20
permissions I can deal with, selinux drives me insane.
From: Manthorp 7 Jul 2016 13:19
To: ANT_THOMAS 19 of 20
Amen to that.  I expect Apple to treat their users as if they are Luddites with an instinct for self-harm, but Linux is open source and tinkerable, and the assumption should be that people will tinker with it.  Obliging them to type 'Simon says' before any change can be effected is irritating beardy paranoioa.
From: CHYRON (DSMITHHFX) 7 Jul 2016 14:48
To: Manthorp 20 of 20
The general idea is Simon, and only Simon, says...