Ftp

From unRAID
Jump to: navigation, search

The goal of this tutorial is to get you setup with the default unRaid ftp server with

  1. username/password to read/write from a specific directory
  2. 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

mcedit /etc/vsftpd.conf

Here's what the whole thing should look like:


# vsftpd.conf for unRAID
#
write_enable=YES
connect_from_port_20=YES
passwd_chroot_enable=YES
#
#
# Allow anonymous FTP?
anonymous_enable=YES
anon_max_rate=102400
anon_mkdir_write_enable=NO
no_anon_password=YES
#
# Allow local users to log in.
local_enable=YES
local_umask=077
local_root=/mnt
check_shell=NO
# anon_world_readable_only=NO
#
# All file ownership will be 'root'
# guest_enable=YES
# guest_username=root
# anon_upload_enable=YES
# anon_other_write_enable=YES
# anon_mkdir_write_enable=YES
#
# Logging to syslog
syslog_enable=YES
log_ftp_protocol=NO
xferlog_enable=NO
#
# Misc.
dirmessage_enable=NO
ls_recurse_enable=YES


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:
ftp:x:14:50::/home/ftp:/bin/false

I changed the line to look like this:
ftp:x:14:50::/mnt/user/Books/nautical_pubs:/bin/false

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: