Symbolic link all files in directory to show in another directory?

Posted by Thomas Clayson on Ask Ubuntu See other posts from Ask Ubuntu or by Thomas Clayson
Published on 2012-03-19T17:24:17Z Indexed on 2012/03/19 18:14 UTC
Read the original article Hit count: 323

Filed under:
|

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:

file.sh
another.txt
something_else.i386

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

ls /home/ftp:

user_file.mk

ls /srv/ftp:

file.sh
another.txt
something_else.i386
user_file.mk

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! :)

© Ask Ubuntu or respective owner

Related posts about ftp

Related posts about symbolic-link