12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 13FTPSince SFTP (from SSH toolset) is meant to be a secure replacement for FTP protocol,FTP protocol is used for different purposes. As FTP does not encrypt or compressdata on the fly, it offers superior performance over the SFTP.Like other core services, FreeBSD has its own ftpd(8) daemon included in the basesystem. The ftpd daemon can simply be enabled from the inetd daemon, which issuitable for a system with a somewhat low FTP traffic. However, you can run theftpd in the stand-alone mode, in which the ftpd daemon will run in the backgroundand answers FTP requests.If you are setting up a busy FTP server, it is not advisable to run ftpdfrom inetd, which may reduce performance of the system with manyFTP requests, or many simultaneous FTP users.Adding the following line to the /etc/rc.conf file enables ftpd(8):ftpd_enable="YES"You should then start the ftpd by running the appropriate rc script:# /etc/rc.d/ftpd startNow you are set. The ftpd daemon is listening for incoming connections on TCPport 21, and authenticates users against the system's local passwd scheme, whichmeans that you can log into the FTP server, using your system logins. Users will bedirected to their own home directory when they log into the FTP server. Moreover,the same disk access permissions apply to the FTP users. In fact, the ftpd processforks a new ftpd process with the logged in user's permission, and has the sameaccess restriction.Anonymous FTP ServerAn FTP server can also be used as a public file repository for public masses thatdo not require an individual login access to the system. This is the case where"anonymous ftp access" pops out. An anonymous FTP access lets people <strong>download</strong>files from the FTP server, or upload to specific directories on the server. Users shouldlog into the FTP user using the username "anonymous" and their email address asthe password (which can be ignored).To enable an anonymous- only FTP access, you should add the following parameterto the rc.conf file:ftpd_flags="-A"And restart the running ftpd daemon.[ 221 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!