ftp

How To: follow Symbolic Links with Pure-FTPd

My need was to share a directory with a chrooted user, and with Pure-FTPd doing it is very easy.

The FAQ is very exhaustive, I recommend you read it, here in my case I go directly to the point.

From the official FAQ http://download.pureftpd.org/pub/pure-ftpd/doc/FAQ

Making a symbolic link won't work, because when you are chrooted, it means that everything outside a base directory (your user's home directory) won't be reachable, even though a symbolic link.

If you are compiling Pure-FTPd from source, add --with-virtualchroot to your ./configure options.
Binary packages are compiled with this feature turned on, and this is my case.

Open this file: /etc/default/pure-ftpd-common

and set the VIRTUALCHROOT option to TRUE, by default is set to FALSE.

# VIRTUALCHROOT:
# whether to use binary with virtualchroot support
# valid values are "true" or "false"
# Any change here overrides the setting in debconf.
#VIRTUALCHROOT=false
VIRTUALCHROOT=true

Restart the Pure-FTPd server with /etc/init.d/pure-ftpd restart.

Now you are able to create the symbolic link into the user's directory.

How to upload files to remote server using ftp command from Windows Command Prompt

In this article, I will show you how to transfer files to a remote server, using the ftp command - line - directly from the Windows Command Prompt.

Prerequisites are: remote server must have FTP Server up and running and accept FTP connection.

Let's create the file scripts.txt, fill it with the necessary instructions to login, transfer mode, destination, files list, end connection.

file: script.txt

ftp_username
ftp_password
bin
cd public_html
put file_1.ext
put file_2.ext
put file_n.ext
bye

Now to start the transfer by command prompt: type the ftp command as follow.

You can reach the server with an IP address

ftp -s:script.txt xxx.xxx.xxx.xxx

Or domain name

ftp -s:script.txt example.com

If you want to automate this procedure, using a batch file, create a file upload.bat and fill it with the preferred command line.

Subscribe to RSS - ftp