The goal of this tutorial is to get you setup with the default unRaid ftp server with
- username/password to read/write from a specific directory
- anonymous username to read from that directory
I'm currently on Unraid Media server 5.0-b14. I will be using the root account in telnet to the server which is called DUMBO. I will put commands that I use in bold & italic on their own line.
Through some reading, users have said that unRaid comes with ProFTP. But for some reason, my system has vsFtp which is a different FTP server.
So far as I can tell, vsftp comes with this version of unRaid and doesn't require any installtion - it's just there.
By adding a # pound symbol to be beginning of a line, it effectively tells unRaid (linux) to ignore that line. It's called commenting out a line.
Start by editing the vsftpd.conf file
Here's what the whole thing should look like:
# vsftpd.conf for unRAID
# Allow anonymous FTP?
# Allow local users to log in.
# All file ownership will be 'root'
# Logging to syslog
For an explanation of all these items, look the "vsftpd.conf manual" link at the bottom of the page
For an anonymous user, once they login, they're treated as a user named "ftp". You need to chose where you want their home directory to be. That is, where their directory tree starts once they login. You do that by modifying the /etc/passwd file.
There's a line in there that looks like this:
I changed the line to look like this:
So the home directory for the anonymous ftp user ("ftp" on the system) is going to be /mnt/user/Books/nautical_pubs. Once they log in, it will look like they're in their home directory.
All the regular linux permissions apply, so you may have to do some messing around with them like this: chmod -R 775 /mnt/user/Books/nautical_pubs which would recursively make owner read/write/execute, group read/write/execute, and others (the ftp user) read/execute
give other people access to the stuff you want to share you need to make it readable and executable by others.
chmod o+rx -R /mnt/Books/nautical_pubs/
Here are the links that I'm going from:
- https://security.appspot.com/vsftpd.html official vsftpd
- http://vsftpd.beasts.org/vsftpd_conf.html vsftpd.conf manual
- http://linux.die.net/man/5/vsftpd.conf more vsftpd.conf info
- https://calomel.org/vsftpd.html a vsftpd howto
- http://www.linuxquestions.org/questions/linux-security-4/vsftpd-anonymous-user-419112/ getting ls to work while anon_root is set
- http://www.g-loaded.eu/2008/12/02/set-up-an-anonymous-ftp-server-with-vsftpd-in-less-than-a-minute/ bind mounting to give anonymous access to other directories