|
Setting up a single FTP account with limited access |
|
The goal: to set up FTP, not for all unix users, but only for one user. The account should work like a unix account, but use a password that is not valid for SSH. It should be trivial to add more users later.
Environment: Debian Linux 5.0
FTP server: Proftpd
Steps:
- Install proftpd Debian package
- Edit config file: /etc/proftpd/proftpd.conf:
DefaultRoot ~ AuthUserFile /etc/proftpd/passwd AuthOrder mod_auth_file.c
The easiest way to create an account, with the same uid/gid as an existing unix account, is copying the password line for this user:
- Make /etc/proftpd/passwd with cat /etc/passwd |grep <username> > passwd
- Replace the x for password in /etc/proftpd/passwd with a crypto password. You can create one with: htpasswd -bn testfile <username> <password>
- Replace the homedir in /etc/proftpd/passwd with the correct directory
Restart proftpd when ready
Refences: http://www.proftpd.org/docs/howto/AuthFiles.html |