I'm looking for a file sharing protocol that.

  • has client software for ubuntu and mac os x
  • has server software for ubuntu.
  • lets me mount encrypted file partitions using pam_mount. (or something similar)
  • allows random access

What doesn't work


There's no random read access.


Doesn't allow me to mount my encrypted partitions with pam_mount, because the password isn't sent in clear. (And encrypting the volume with the stored hash is pretty insecure because the hash is weak.)


Plaintext password doesn't have to be a requirement. If the file server runs SSH, script a ssh host mount /dev/encrypted_disk ... just before accessing the filesystem. (If you use pam_mount on your local system too -- add a pam_exec.)

| improve this answer | |
  • That's a possibility I'm considering. Given that fact that it's also going to act as a backup disk it would be nice if that worked without any user intervention though. So SSH'ing to the server is suboptimal. – Georg Schölly Oct 28 '10 at 21:27
  • You can SSH without user intervention - it requires you to use keys instead of passwords – Broam Oct 28 '10 at 21:34
  • @Broam: Which it turn makes it impossible to decrypt the partition, because the password is used as the key for it. – Georg Schölly Oct 29 '10 at 5:31
  • @Georg: Not necessarily. You use keys for SSH authentication, but then pass the PAM password to a program being ran over SSH. This could be achieved using pam_ssh.so to unlock the SSH keys, and pam_exec.so expose_authtok ssh remotehost mount blahblah to mount the remote filesystem. (expose_authtok will make pam_exec.so give your login password to ssh through stdin, to be consumed by remote mount. It's a relatively new addition to Linux-PAM, though.) – user1686 Oct 29 '10 at 19:14
  • If I understand you correctly, this is what happens: You log in and the computer automatically sshs to the server. That means, I actually don't need to use keys, because this works only on login (using gdm, ssh, ...) Basically, this is mount-on-login. Did I understand that correctly? (I'm using pam_mount at the moment to mount the encrypted partitions on the server on SSH login anyway, but that works only for password-logins obviously.) – Georg Schölly Oct 31 '10 at 13:45

Have a look at NFS.

| improve this answer | |
  • I did. Is there a simple way of configuring it without going crazy? – Georg Schölly Oct 28 '10 at 20:19
  • I just read a little bit about how authentication works with NFS. Apparently one has to use a separate kerberos server. Doesn't this mean that pam_mount won't work because the password is never sent to the file server? – Georg Schölly Oct 28 '10 at 20:56

I'd probably use either SMB or NFS with an SSH tunnel.

Watch out with NFS though. I've had a lot of problems with it on OSX using large files. The OSX client will try to cache a 4GB file in memory then the OS runs out of mememory and starts paging like mad and thrashes the HDD. The entire computer becomes unresponsive.

| improve this answer | |

The simplest way is to use SFTP. I initially thought it wouldn't allow random read/write access, but it does.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.