Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FTP Setup for newbies
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Celcius1
n00b
n00b


Joined: 10 Apr 2004
Posts: 17

PostPosted: Wed Aug 11, 2010 4:33 pm    Post subject: FTP Setup for newbies Reply with quote

I was wondering is there a ftp howto out there that actually is easy to follow as i have spent the last 3 hrs tryin to setup an ftp server to multiple directories for multiple users and having no luck, i followed a basic setup for VSFTP but when i tried to navigate to other directories it couldnt and wouldnt show the content in those directories and no matter what permissions i setup it just would not work, if someone could help me get out of this bind, and put up a ftp setup for newbies, would be greatly appreciated and dont suggest using a gui for setup as one is not being installed i need instructions on how to do it in the console otherwise i would goto the trouble of installing a gui, and i'm not installing one cause i dont require it on the box.

So any help will be greatly appreciated and if you suggest using a differenet ftp then by all means i will change the one installed but i need to get out of this blasted bind, my head is getting sore from banging my head aganst the screen and getting no where

Celcius1
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5282

PostPosted: Wed Aug 11, 2010 6:40 pm    Post subject: Reply with quote

This is not a direct answer, but it might help you in the long run with your overall understanding of different FTP daemons.

If you don't have it, emerge eix, then run eix-update. Enter "eix ftp", which should give you a long list. Look over this list, read the descriptions, and try a few different FTP servers. I'm sure you'll find one that's right for you at some point.
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
lxg
Veteran
Veteran


Joined: 12 Nov 2005
Posts: 1019
Location: Aachen, Germany

PostPosted: Wed Aug 11, 2010 7:31 pm    Post subject: Reply with quote

Celsius1: vsftpd is actually set up quite easily; however, one faulty setting can mess it all up (just like everywhere else).

Can you post your /etc/vsftpd/vsftpd.conf?

Code:
grep -v -e "^$" -e "^#" /etc/vsftpd/vsftpd.conf


Do you want to do anonymous FTP or user-based? (From what you write above, you want user-based, right?)

Can you post any error messages or other hints to your problem?
_________________
lxg.de – codebits and tech talk
Back to top
View user's profile Send private message
Celcius1
n00b
n00b


Joined: 10 Apr 2004
Posts: 17

PostPosted: Wed Aug 11, 2010 11:17 pm    Post subject: Reply with quote

i'm not getting error messages i've setup my users they can log in, and see the assigned root dir but no one can navigate the set file structure for the ftp server, i'll post the conf file, but i think its an issue with how i have setup my directories, as i have used symlinks to link the relevant directories to the ftp root directory which is mounts to other drives

/etc/vsftpd/vsftpd.conf

local_enable=yes
write_enable=yes
anonymous_enable=no
xferlog_enable=yes
xferlog_file=/var/log/vsftpd/vsftpd.log
idle_session_timeout=600
data_connection_timeout=120
ascii_upload_enable=no
ascii_download_enable=no
nopriv_user=ftp
dirmessage_enable=yes
ftpd_banner=Torrent Box
chroot_list_enable=no
chroot_local_user=yes
#background=yes
listen=yes
ls_recurse_enable=no
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1707

PostPosted: Thu Aug 12, 2010 5:05 pm    Post subject: Reply with quote

FTP (at least, the daemon I use) won't follow symlinks - it's a major security
hole. You'll have to dig through your docs to see how to override this, or
revise your directory tree.

Will
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 9120

PostPosted: Fri Aug 13, 2010 3:29 am    Post subject: Reply with quote

Why are you using ftp instead of something more secure, such as sftp?

Also, when posting configuration files, it can be helpful to use a code tag to make it more readable.

Celcius1 wrote:
i think its an issue with how i have setup my directories, as i have used symlinks to link the relevant directories to the ftp root directory which is mounts to other drives

chroot_local_user=yes
man vsftpd.conf:
       chroot_local_user
              If  set  to  YES,  local  users  will  be  (by default) placed in a
              chroot() jail in their home directory after login.   Warning:  This
              option  has  security  implications,  especially  if the users have
              upload permission, or shell access. Only enable if  you  know  what
              you  are  doing.   Note  that  these  security implications are not
              vsftpd specific. They apply to all FTP daemons which offer  to  put
              local users in chroot() jails.
Using chroot in conjunction with symbolic links is asking for trouble. Even if you allow the daemon to follow symbolic links, those links cannot leave the chroot area. Your post suggests that this is what you tried to do. It will not work. Use bind mounts if you must expose other areas.
Back to top
View user's profile Send private message
Anarcho
Advocate
Advocate


Joined: 06 Jun 2004
Posts: 2959
Location: Wuppertal (Germany)

PostPosted: Fri Aug 13, 2010 6:25 am    Post subject: Reply with quote

I know that PureFTPd can handle these setups as I have it like that. All users have chroot-jails but some have symlinks to directories in e.g. /srv/htdocs/. The users haven't shell access and can't create symlinks through FTP, so I think it is rather safe (also, only 2 personally trusted users have access here).

From the PureFTPd FAQ:

Quote:
Symbolic links can be followed when users are chrooted, even when they are pointing out of the chroot jail. This unique feature makes shared content easy to set up.


So it looks like this can only be done using PureFTPd.
_________________
...it's only Rock'n'Roll, but I like it!
HOWTO:WLAN mit OpenVPN absichern | TOOL:useedit - USE-flag editor/changer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum