paCkeTroUTer Posted December 9, 2003 Report Share Posted December 9, 2003 Hi I am trying to create a symlink for a folder. I am doing this via ssh which connects to my Web server. The server structure looks like this: /home/techsat/ downloads/ public_html/ downloads/ uploads/ How can I make a symlink for the uploads folder which when browsed through ftp client will take you to the downloads folder which is outside the webroot(public_html) folder. Thanks Quote Link to comment Share on other sites More sharing options...
Qchem Posted December 9, 2003 Report Share Posted December 9, 2003 ln -s /home/techsat/downloads/ uploads when you're in the public_html/downloads directory should work, try it.... Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 9, 2003 Report Share Posted December 9, 2003 i dont know if the ftp security would allow that although i think i saw a setting in proftpd that allows following symlinks outside the ftp root. but be aware that this is a security risk. why not do it the other way around? make the uploads directory the real one and just symlink the downloads directory to it? ciao! Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted December 9, 2003 Author Report Share Posted December 9, 2003 Qchem's code worked and I can access it via command line.. but as ramfree17 mentioned, it must be a security feature, I can't access the downloads folder via ftp. /home/techsat/ downloads/ public_html/ downloads/ uploads/ In my case downloads(under public_html) is a sub domain which contains basic files to control the downloads. downloads folder outside the webroot contains the downloadable files. How can I make it so that when I login to the subdomain, that I can upload files to the downloads folder which is sitting outside the webroot ? Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 9, 2003 Report Share Posted December 9, 2003 just like what i said $ mkdir /home/techsat/public_html/downloads/uploads $ln -s /home/techsat/public_html/downloads/uploads /home/techsat/downloads crude but i dont see why it wouldnt work. ciao! Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted December 9, 2003 Author Report Share Posted December 9, 2003 hmm I am not sure if that will work. The whole point is to keep the downloadable files under the webroot and make it available through a script. Symlinking from under the webroot to a folder sitting above the webroot won't do much good.... unless I didn't understand your response very well(I tried it though). Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 10, 2003 Report Share Posted December 10, 2003 sorry, i think we are experiencing a language barrier. my understanding was that you want to have a downloads folder that resides in the techsat directory and you want to have a ftp folder that has the same contents. the problem is that the downloads folder is outside the ftp root. with this premise, i was thinking you can still have the same result if you reverse the process wherein the ftp-download folder is the real one and you just create a symlink from the techsat folder to it. the result is that the contents of the folder are accessible from both instance (cli and ftp). i apologize if this is not what you were looking for. :) ciao! Quote Link to comment Share on other sites More sharing options...
paCkeTroUTer Posted December 10, 2003 Author Report Share Posted December 10, 2003 nope thats not what I was looking for. Thanks anyway for your response. I have found an other solution to my problem with a different approach. :) :) Quote Link to comment Share on other sites More sharing options...
ramfree17 Posted December 11, 2003 Report Share Posted December 11, 2003 nope thats not what I was looking for. Thanks anyway for your response. I have found an other solution to my problem with a different approach. :) :) care to share that other approach? :) ciao! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.