LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-07-2010, 08:13 AM   #1
astalavista2000
Member
 
Registered: Apr 2010
Distribution: debian
Posts: 42

Rep: Reputation: 0
Sharing files - FTP / Apache


Hi there. I've been setting up a FTP server with pure-ftpd. Everything is going ahead. I have tested the ftp with filezilla and it works perfectly. After this, I wanted to access my ftp files through the web. Because of that, I've installed apache web server and published the ftp files directory by creating a symbolic link in /var/www pointing to the ftp directory. Up to this point I have no problems at all. I'm able to download files from my server using any web browser. The fact is that, during this process, I realized that I'm not using ftp anymore. I mean, if someone uses the web to download files from my "public ftp server" he is using apache, not pure-ftpd. Is there any way to use ftp server with http without dropping ftp capabilities? Please let me know If I'm not accurate enough to describe this issue.
Thanks in advance.
 
Old 12-07-2010, 08:57 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
Hi,

You can use a browser to download files from ftp servers. Just use ftp://ftp.server.com in the browser address bar
And of course you don't need the symlink in apache docroot if you don't like to give web access to your files.

Regards
 
Old 12-07-2010, 10:01 AM   #3
morfanaion
LQ Newbie
 
Registered: Dec 2010
Distribution: OpenSUSE 10.3
Posts: 7

Rep: Reputation: 0
If you want people to download files from your FTP server using pure-ftp, you need to enable anonymous login (at least, if you want everyone to be able to access your files). They will, like bathory mentions, require to declare the use of the ftp protocol rather than the http protocol (which will, OC, never work with an ftp daemon). To make this easier, you can make a link in your apache webpage to ftp://whateveryourdomainmaybe and it will immediately take them there. You can choose whether you want anonymous logged in users to be able to upload files, but that may not be advisable.
 
Old 12-07-2010, 03:03 PM   #4
astalavista2000
Member
 
Registered: Apr 2010
Distribution: debian
Posts: 42

Original Poster
Rep: Reputation: 0
Bathory, It's very clear what you've mentioned. I use ftp://myPublicIP:PortName to access through the web and the result was the expected. Thanks for that.
Morfanaion, I want to link ftp://myPublicIP:PortName to my current domain, say, mydomain.com (this domain is currently pointing to the ftp directory published by apache).
I don't knwow how to accomplish this.
I created a symLink in /var/www like
Code:
ln -s ftp://myPublicIP:PortName mydomain.com
But It seems that it is wrong.

Last edited by astalavista2000; 12-07-2010 at 03:45 PM.
 
Old 12-08-2010, 05:50 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
Blog Entries: 1

Rep: Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071Reputation: 2071
Hi,

If you want to give users the ability to connect to your ftp server from apache, you can use a Redirect:
Code:
Redirect /ftp ftp://myPublicIP:PortName
This way when a user visits http://myPublicIP/ftp it will be automatically redirected to the ftp server.

Regards
 
Old 12-08-2010, 08:55 PM   #6
astalavista2000
Member
 
Registered: Apr 2010
Distribution: debian
Posts: 42

Original Poster
Rep: Reputation: 0
Bathory, you´re right. I used a Redirect in my httpd.conf and the ftp in now accesible through apache.
Thanks to you and morfanaion for your help.

Regards


Quote:
Originally Posted by bathory View Post
Hi,

If you want to give users the ability to connect to your ftp server from apache, you can use a Redirect:
Code:
Redirect /ftp ftp://myPublicIP:PortName
This way when a user visits http://myPublicIP/ftp it will be automatically redirected to the ftp server.

Regards
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow ftp user access to modify apache owned files jasonma84@yahoo.com Linux - Newbie 4 10-26-2010 05:25 PM
FTP client can't access files in /var/www/html (Apache ) dshap Linux - Newbie 8 06-03-2009 01:12 PM
mandrake 10.1 sharing files and internet sharing xfiles_arram Linux - Networking 0 05-21-2005 03:22 PM
sharing files via FTP zoso Linux - Networking 2 01-27-2005 12:50 AM
Windows and Linux sharing files for Apache and IIS marghorp Linux - Networking 6 03-17-2004 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration