Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I get my ubuntu server 12.04 to automatically mount the encrypted home partition after an ftp login? It will automatically mount after an ssh login and I can then access the encrypted information over ftp but I don't want to have to log into ssh every time I want to use ftp.

share|improve this question
    
How is SSH mounting it? –  Ignacio Vazquez-Abrams Dec 16 '12 at 6:02
add comment

1 Answer

When you login into your system, either directly or via ssh, it is usually the pam_ecryptfs module that takes care of automatically mounting your encrypted home.

This module will use your password to decrypt a better key (referred to as passphrase in the docs) and make your encrypted home directory available.

Setting up pam_ecryptfs for FTP logins seems like a really bad idea, though. FTP sends passwords (and data) in clear text. This means that anyone on your network will be able to steal your password and be able to decrypt your data.

I would either:

  • Not use FTP. Use sftp, scp, putty, winscp, whatever, based on ssh.
  • If you have to use FTP, I would not encrypt the data at all. Assume that once you do the first transfer, anyone will be able to access it anyway. Or create a subdirectory where you keep data available via FTP.

If you really really want to enable mounting encrypted directories automatically with ftp, you can add a line like:

auth required pam_ecryptfs.so unwrap

in /etc/pam.d/proftpd, assuming your FTP server is proftp.

If you use this and it works, please tell us you are using a VPN or a socks proxy over an SSL tunnel or ssh. Lie if you have to.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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