Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I want is to be able to display all files that are ftp'd into /home/ftp in /srv/ftp

/srv/ftp is password protected, and has files in it which I don't want to be accessible from the public ftp.

So as such I wish that all files uploaded to /home/ftp are automatically symbolically linked (or otherwise) to /srv/ftp. Does this make sense?

e.g. ls /srv/ftp:

then a user ftp's and drops a file in /home/ftp (or ssh, or whatever)

ls /home/ftp:

ls /srv/ftp:

I hope this makes sense. I have been told that this can probably be achieved using ln to create symbolic links, but I don't want to have to ssh in and create the links every time I (or someone else) puts files over ftp.

Thanks! :)

share|improve this question
I think you are looking at a script of some kind, and, IMO I would run rsync from cron. – bodhi.zazen Mar 19 '12 at 17:56
up vote 1 down vote accepted

Adding the following line at the end of your crontab would achieve what you want:

*/1 * * * * ln -s /home/ftp/* /srv/ftp

To edit your crontab:

crontab -e

With this, /home/ftp/ will be scanned every minute and the appropriate symlinks made in /srv/ftp/.

Crontab is the command-line equivalent of Scheduled Tasks.
For details about its syntax, check out this page.

share|improve this answer
cool, thanks for that! :) – Thomas Clayson Mar 20 '12 at 16:07
Glad to help :) – SirCharlo Mar 20 '12 at 16:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.