LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-14-2003, 09:04 PM   #1
corpus_delicti
LQ Newbie
 
Registered: Apr 2003
Location: New York
Distribution: Red Hat 8
Posts: 15

Rep: Reputation: 0
Symbolic Links with VSFTPD


I finally got my ftp server running. I am wondering if there is a way for the user to use symbollic links in his directory. I am trying to link a folder entitled "Images". This is on a mounted harddrive -- /mnt/shares

The fstab for /mnt/shares is
/dev/hdb1 /mnt/shares vfat user,umask=000 0 0

Whenever i try to cd to Images I get an error that says
"550 Failed to change directory."

Any help is greatly appreciated,
Thanks
 
Old 11-02-2003, 09:47 PM   #2
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
*bump*
I am looking into this problem as well.

I have just setup vsftpd in Fedora Pre-3 and have it set such that chroot_local_users=YES, however, for some users, I want them to be able to link to my CDROM (/mnt/cdrom). How do I do it? I tried creating a symlink but that doesn't seem to fly. All permissions look like they are set correctly. Is this a vsftpd thing or is this a config problem?

I have a feeling it is because I have my users chrooted or that vsftpd has taken out this functionality to make a safer system.

Your comments are welcome and I'll post if I have a solution.
J.
 
Old 11-09-2003, 05:54 PM   #3
cjpsparks
Member
 
Registered: Sep 2003
Location: Colorado
Distribution: RedHat 8
Posts: 49

Rep: Reputation: 15
same problem!

I have the exact same problem. I don't want users to be able to browse my entire computer, yet I would like to give them access to ONE directory: /mnt/win_share

Any Ideas?
 
Old 11-13-2003, 03:45 AM   #4
RinGz
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta, GA and Dallas, TX
Posts: 23

Rep: Reputation: 15
looks like we're getting bumped again.... same problem. I have several shared folders from my old (blech-windows) ftp server that I have mounted in /mnt/nfsr that I want shared in my vsftpd server. My users are chroot'd, too.
 
Old 11-13-2003, 03:50 AM   #5
RinGz
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta, GA and Dallas, TX
Posts: 23

Rep: Reputation: 15
okay, I just found a solution thanks to aafeee (I think was his name)

mount --bind /path/you/want/to/include /path/to/vsftpd/docroot/subdir

works for me-I just checked it out.
 
Old 11-13-2003, 10:26 AM   #6
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
Thanks RinGz and aafeee. I will try this solution when I get home.

How does this work across multiple users? For example, I have users chrooted to their home directories
/home/usera
/home/userb
And I want to share my cdrom, /mnt/cdrom, with both of them via ftp.
From reading the man page, I suspect it would look like this...
mount --rbind /mnt/cdrom /home/usera
mount --rbind /mnt/cdrom /home/userb
(I will verify if this is correct when I get home)

The man page also says that this feature is only available for kernel's 2.4 and greater (fine for me but might be helpful for future readers)

Thanks again,
J.
 
Old 11-13-2003, 10:31 AM   #7
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
As luck would have it, I had left a CD in my cdrom and was able to remotely test this.

YaY. It works!
Thanks RinGz for posting and aafeee for answering.

Regards,
J.
 
Old 11-15-2003, 03:25 PM   #8
RinGz
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta, GA and Dallas, TX
Posts: 23

Rep: Reputation: 15
JordanH, I think this might work, but just to make sure, I'd do:
mount --rbind /mnt/cdrom /home/usera/cdrom
mount --rbind /mnt/cdrom /home/userb/cdrom

that's essentially what I'm doing 'cept with ftp.
 
Old 11-15-2003, 07:35 PM   #9
RinGz
LQ Newbie
 
Registered: Oct 2003
Location: Atlanta, GA and Dallas, TX
Posts: 23

Rep: Reputation: 15
oh, just realized that you have a type (that I quoted)
it's --bind not --rbind

oh, and one more thing: the person I got this from was affeee not aafeee. just wanted to make sure the right person got credit
 
Old 11-16-2003, 11:53 AM   #10
JordanH
Member
 
Registered: Oct 2003
Location: Toronto, Canada
Distribution: Ubuntu, FC3, RHEL 3-4 AS Retired: SuSE 9.1 Pro, RedHat 6-9, FC1-2
Posts: 360

Rep: Reputation: 30
RinGz, just to clarify....

--bind does not mount any submounts
--rbind does mount all submounts

For the CDROM it probably doesn't matter which you use because there are usually no submounts; it doesn't hurt to use --rbind.

For instance... if you have 3 cdroms mounted as such
/mnt/cdroms/cd1
/mnt/cdroms/cd2
/mnt/cdroms/cd3

Then instead of mounting each CDRom to each home/user directory, you could just mount once.
mount --rbind /mnt/cdroms /home/usera/cdroms
mount --rbind /mnt/cdroms /home/userb/cdroms

with --bind you would need 6 mount statements instead of 2. *shrug* Call me lazy.
 
  


Reply



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
cp and symbolic links? sausagejohnson Linux - General 3 07-19-2005 01:25 AM
Symbolic links? TongueTied Linux - Newbie 3 08-27-2003 06:00 AM
Symbolic links bkmesenbrink Linux - Newbie 2 11-13-2002 11:54 AM
Symbolic links pdstatha Programming 1 04-08-2002 09:50 PM
symbolic links winger Linux - General 5 04-06-2002 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:16 PM.

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