Jump to content

Help with symlink command


Recommended Posts

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 ?

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...