LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-12-2005, 02:26 AM   #1
depam
Member
 
Registered: Sep 2005
Posts: 851

Rep: Reputation: 30
vsftp inquiry


Guys, i have a problem with my ftp sharing. I am using vsftp and if i open the URL : public@192.168.0.220. The public is the user and 192.168.0.220 is the IP, I get to open the /home/public directory. Is there a way to point this to another directory? For example if i open public@192.168.0.220, the directory /public will be shown.
 
Old 10-12-2005, 02:12 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
You can use the chroot options to chroot to a user's home directory
 
Old 10-12-2005, 02:23 PM   #3
chemdawg
Member
 
Registered: Jan 2005
Distribution: Mandriva
Posts: 206

Rep: Reputation: 30
Quote:
Originally posted by david_ross
You can use the chroot options to chroot to a user's home directory
what? how do you do that via ftp???
 
Old 10-12-2005, 03:48 PM   #4
destuxor
Member
 
Registered: Oct 2005
Posts: 51

Rep: Reputation: 16
Re: vsftp inquiry

Quote:
Originally posted by depam
Guys, i have a problem with my ftp sharing. I am using vsftp and if i open the URL : public@192.168.0.220. The public is the user and 192.168.0.220 is the IP, I get to open the /home/public directory. Is there a way to point this to another directory? For example if i open public@192.168.0.220, the directory /public will be shown.
The easiest way would be to use usermod or graphical useradmin program to change the home directory of the user named "public".
Something I used to do for a secure, easy means of sharing directories for several users without letting them out of their chroot was to use the bind feature of modern Linux kernels.
To use bind, you simply type
Code:
mount --bind /home/shared /home/public/shared
Of course, the directory /home/public/shared has to exist before you can mount like that. Once this is done, any files in /home/shared will appear in /home/public/shared. You can use other mount commands, such as -ro for read-only. Like I said, it's a pretty secure means of sharing resources. To make these directories mount at boot, you'll need to add a line to /etc/fstab.
A lot of people have done this:
http://forums.gentoo.org/viewtopic-t...ht-vsftpd.html
http://forums.gentoo.org/viewtopic-t...ount+bind.html
One final note, don't try using symlinks. It doesn't work, and even if it did you wouldn't want it to.

Also, I have a howto on my website if you want some example configs: http://gentoobox.rh.ncsu.edu/vsftpd-help.html

Quote:
Originally posted by chemdawg
what? how do you do that via ftp???
From man vsftpd.conf:
Quote:
chroot_list_file
The option is the name of a file containing a list of local users which will be placed in a chroot() jail in their home direc-
tory. This option is only relevant if the option chroot_list_enable is enabled. If the option chroot_local_user is enabled,
then the list file becomes a list of users to NOT place in a chroot() jail.

Default: /etc/vsftpd/chroot_list
 
  


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
Squid inquiry ImAnEwBiE Linux - Newbie 1 10-26-2006 04:19 AM
SQUID inquiry depam Linux - Software 1 10-17-2005 02:15 AM
Certification Inquiry Slacks98 Linux - Certification 1 11-23-2004 08:53 AM
very basic inquiry ixion Programming 1 10-17-2003 11:53 AM
fluxbox inquiry pathogenik Linux - General 12 07-14-2002 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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