LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2013, 07:20 AM   #1
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Rep: Reputation: 0
FTP from a web browser


Hi Linux gurus,

I have set up a web browser and I would like to add an ftp hyperlink to a couple of directories. As of right now, I can only do this for /var/ftp/pub, where do I go to add other directories?

So far, I am able to put this in my web browser and it'll display the directory and anyone can download anything they want:

ftp://<ip address>/pub

Now I want them to access a directory that is not under /var/ftp/

Thanks for all your help!
 
Old 04-01-2013, 07:23 AM   #2
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Original Poster
Rep: Reputation: 0
Sorry.. this is what I'm running:

RHEL 6.2 (Santiago)
Linux version 2.6.32-220.el6
gcc version 4.4.5 20110214 (Red Hat 4.4.5-6) (GCC)
 
Old 04-01-2013, 07:47 AM   #3
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Allowing FTP Access to Files Outside the Home Directory Chroot
 
Old 04-01-2013, 10:45 AM   #4
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
Quote:
Originally Posted by DavidDiepUSC View Post

I have set up a web browser
You mean a web server?

Are you using vsftpd?

Give proper permission to parent directory so no one can open them. It will show access forbidden error.

OR

Put a filename index.html in your all parent directories so no one can see the content of the directories.
 
Old 04-01-2013, 11:54 AM   #5
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Original Poster
Rep: Reputation: 0
eklavya,

My apologies... yes, a webserver.

Yes, I am using vsftpd.

I'm not sure what you mean... I want everyone to have access to be able to see everything under directories that I list. For example, if I provide a link on my website:

ftp://<ip address>/videos
and
ftp://<ip address>/pictures

What do I need to do to add these directories so that they can be accessible? /stuff/videos and /stuff/pictures

Right now /var/ftp/pub is the only directory available...
 
Old 04-01-2013, 12:01 PM   #6
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Original Poster
Rep: Reputation: 0
I can create two folders: /var/ftp/pub/videos and /var/ftp/pub/pictures and dump the contents from /stuff/videos and /stuff/pictures, but I was wondering if there was a file that I could update to simply add /stuff to.

Maybe its not available?
 
Old 04-01-2013, 12:14 PM   #7
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by DavidDiepUSC View Post
I can create two folders: /var/ftp/pub/videos and /var/ftp/pub/pictures and dump the contents from /stuff/videos and /stuff/pictures, but I was wondering if there was a file that I could update to simply add /stuff to.

Maybe its not available?
I think you didn't see the link i provided.
  1. Create directories /var/ftp/pub/videos and /var/ftp/pub/pictures
  2. bind the original directories to above path
  3. mount --bind <original-video-directory> /var/ftp/pub/videos
  4. mount --bind <original-pictures-directory> /var/ftp/pub/pictures

To make them permanent, add them in fstab

Last edited by mddnix; 04-01-2013 at 12:15 PM.
 
Old 04-01-2013, 12:16 PM   #8
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Original Poster
Rep: Reputation: 0
Sorry mddesai,

I did see them, but I wanted to avoid bind mounts... maybe its the only way :-/
 
Old 04-01-2013, 12:24 PM   #9
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by DavidDiepUSC View Post
avoid bind mounts...
What's wrong with bind mounts are there any security issues? cause i'm using bind mounts. if there are any disadvantages, then i want to remove them.
 
Old 04-01-2013, 12:49 PM   #10
DavidDiepUSC
Member
 
Registered: Jan 2008
Posts: 58

Original Poster
Rep: Reputation: 0
Oh, no... don't get me wrong. I use them too.

I just was wondering if there was a .conf file somewhere that I didn't know about that I could specify what directories I want ftp access to. Thats all. Bind mounts are fine... I have updated my fstab to add the following:

# Bind Mounts for odcdocs FTP access
/Userguides/videos /var/ftp/pub/videos none bind 0 0
/Userguides/pictures /var/ftp/pub/pictures none bind 0 0

Thanks for your input with this...
 
Old 04-01-2013, 12:55 PM   #11
mddnix
Member
 
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 516

Rep: Reputation: 139Reputation: 139
Quote:
Originally Posted by DavidDiepUSC View Post

Oh, no... don't get me wrong. I use them too.

Bind mounts are fine...

Thanks for your input with this...
Cheers...
 
  


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
FTP SSL in web browser vikas027 Linux - Software 8 12-24-2011 05:47 AM
problems with ftp in a web browser... markw8500 Linux - Software 1 05-19-2006 12:21 AM
Trouble w/ FTP via Web Browser daihard Linux - Software 3 05-18-2006 10:41 PM
can you access ssl + ftp via web browser paul_mat Linux - Networking 1 12-20-2005 05:37 AM
Can't get out on Web browser, but can ftp d3funct Linux - Networking 1 11-08-2001 03:10 PM


All times are GMT -5. The time now is 11:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration