Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Howto set up an FTP (VSFTPD)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
guy
Apprentice
Apprentice


Joined: 31 Mar 2003
Posts: 286
Location: USA

PostPosted: Thu Apr 10, 2003 8:13 pm    Post subject: Howto set up an FTP (VSFTPD) Reply with quote

A lot of people have been asking about getting an FTP set up. Hopefully this will help...

Before you go, you should have xinet.d set up. If you dont,

Code:

emerge xinetd
rc-update add xinetd default



Now you should be ready for vsftpd:

Code:

emerge vsftpd
 


Once that's installed, edit the file /etc/vsftpd/vsftpd.conf to your liking. It's very well documented. Note it is easiest to set accounts through linux's user/groups. You need to add a user/group for the FTP.
Code:

groupadd ftpgroup
useradd -g ftpgroup -d /home/ftp -p password ftpuser
 


Unfortunately I dont know how to get symbolic links to work with vsftp while chrooting is enabled. They DO work if you dont chroot though-- if you don't chroot, you can throw all the symlinks you want in /home/ftp and they should be accessible by your friends (of course you can make /home/ftp anything you want, like /ftp) (to add a link, just do ln -s target_of_link link_location)

The last step is to go into /etc/xinetd.d/ folder and edit the vsftpd file. Add the line
only_from 0.0.0.0 to allow any IP to connect and change disable = yes to disable = no.

Fire up xinetd and all should be good (you can do /etc/init.d/xinetd start)
Please post corrections or other tips..

--Ben
Back to top
View user's profile Send private message
mcpi
n00b
n00b


Joined: 04 Jun 2003
Posts: 39

PostPosted: Sat Jun 21, 2003 3:07 am    Post subject: still have problem with vsftpd installation Reply with quote

i do the following steps:
- emerge xinetd
- emerge vsftpd
- using /etc/vsftpd/vsftpd.conf (with default setting for testing)
- don't touch /etc/xinetd.conf (so it load the vsftpd - configuration from /etc/xinetd.d/vsftpd)

- editing /etc/xinetd.d/vsftpd
replacing disable = yes ---> disable = no
adding only_from 0.0.0.0

ftp & nobody user exist
-ftp with /home/ftp <-- that doesn't exist (at the moment I don't need it, I need it only if s.b. want to login in - is that correct?) and /bin/false
-nobody with / and /bin/false

logdir
-/var/log/vsftpd exist

/etc/init.d/xinetd exist

- starting xinetd from /etc/init.d/xinetd start
- lsof said xinetd is active

my /var/log/message said:
xinetd Version ... started ....
Started working: 0 available services <----- no ftp daemon has been started

netstat doesn't listing any LISTEN port

so xinetd started, no error message is generated, but my vsftpd doesn't started!

what is my mistake?

thanx for all help.

best regards,

pierre
Back to top
View user's profile Send private message
freebaseh
n00b
n00b


Joined: 31 Jan 2003
Posts: 28

PostPosted: Sat Jun 21, 2003 9:36 pm    Post subject: Reply with quote

same problem here vsftpd isnt starting =(
Back to top
View user's profile Send private message
freebaseh
n00b
n00b


Joined: 31 Jan 2003
Posts: 28

PostPosted: Sat Jun 21, 2003 10:17 pm    Post subject: works now Reply with quote

got it working now
i change only_from = 0.0.0.0 in /etc/xinetd.conf instead for
/etc/xinetd.d/vsftpd
as mcpi wrote
hope this helps some
Back to top
View user's profile Send private message
mcpi
n00b
n00b


Joined: 04 Jun 2003
Posts: 39

PostPosted: Thu Jun 26, 2003 9:11 pm    Post subject: Reply with quote

i made the changes from freebaseh but it doesn't change anything.

i restarted my xinetd, but it still doesn't load anything. same "error"message like before:

xinetd[1827]: xinetd Version 20030122 started with libwrap loadavg options compiled in.
xinetd[1827]: Started working: 0 available services

any new advices?

thanx for help.

pierre
Back to top
View user's profile Send private message
elMariachi
n00b
n00b


Joined: 25 Jun 2004
Posts: 10
Location: Hamburg, Germany

PostPosted: Sun Jul 11, 2004 7:02 pm    Post subject: Reply with quote

Hi.
I've just got the same problem as mcpi has. I had a line Flags = ipv6 (or something like that) in my /etc/xinetd.d/vsftpd file, but i don't have IPv6 configured.. after removing the line it works perfectly. Maybe you made the same mistake?
Back to top
View user's profile Send private message
cryptodev
n00b
n00b


Joined: 16 Apr 2004
Posts: 53

PostPosted: Mon Jul 12, 2004 4:50 am    Post subject: Reply with quote

Just use OpenSSH with sftp enabled.
_________________
Want a Free Blog?
Blog Forums | Build Your Vocabulary (GRE, ACT, SAT)
Back to top
View user's profile Send private message
neysx
Retired Dev
Retired Dev


Joined: 27 Jan 2003
Posts: 795

PostPosted: Mon Jul 12, 2004 9:25 am    Post subject: Reply with quote

Or do not use (x)inet if you find it too confusing.
Back to top
View user's profile Send private message
Gherald2
Guru
Guru


Joined: 02 Jul 2003
Posts: 326
Location: Madison, WI USA

PostPosted: Mon Jul 12, 2004 6:31 pm    Post subject: Reply with quote

cryptodev wrote:
Just use OpenSSH with sftp enabled.


Yeah that's the way to go, but how do you enable sftp?

I'm running non-commercial ssh right now because that's the only way I've gotten the Windows ssh's sftp client to work... when I try using that client on an gentoo box with openssh it says "sftp-server not in path," or something to that effect.
_________________
Unregistered Linux User #17598363
Back to top
View user's profile Send private message
neysx
Retired Dev
Retired Dev


Joined: 27 Jan 2003
Posts: 795

PostPosted: Mon Jul 12, 2004 6:53 pm    Post subject: Reply with quote

Gherald wrote:
cryptodev wrote:
Just use OpenSSH with sftp enabled.


Yeah that's the way to go, but how do you enable sftp?

I'm running non-commercial ssh right now because that's the only way I've gotten the Windows ssh's sftp client to work... when I try using that client on an gentoo box with openssh it says "sftp-server not in path," or something to that effect.
Make sure you have a line Subsystem sftp /usr/lib/misc/sftp-server in your /etc/ssh/sshd_config file.

Hth
Back to top
View user's profile Send private message
qubix
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2003
Posts: 146
Location: Warsaw/Poland

PostPosted: Tue Jul 13, 2004 7:45 am    Post subject: Reply with quote

maybe you have tried to set up vsftpd to associate usernames with ip-aliases addresses? I want to have 50-some users and 50-some aliases in order for each user to be able to connect to the vsftpd through his own alias. I know that this configuration is friggin' stupid, but one of my customers wants that for "security reasons" (woot). I have read that it is dead-easy to do with vsftpd, but i still haven't found HOW to do it.

Thanks !
_________________
qubix
Back to top
View user's profile Send private message
slurve
n00b
n00b


Joined: 31 Jul 2004
Posts: 11

PostPosted: Tue Aug 10, 2004 2:07 am    Post subject: Reply with quote

K, tried everything listed here for changes to xinet conf and vsftp conf (in the order they were listed, didn't undo any changes), and still no luck. Trying to get ftp working from 2 windows laptops only. Edited the hosts.allow to include their IP's with ALL, and got hosts.deny with ALL:ALL.

/var/messages not showing the ftp server is running...xinetd.conf has the line includedir /etc/xinetd.d in it....


Thoughts?
Back to top
View user's profile Send private message
daff
Apprentice
Apprentice


Joined: 02 Jul 2003
Posts: 232
Location: Vienna, Austria

PostPosted: Thu Aug 12, 2004 12:11 pm    Post subject: Reply with quote

Why not drop xinetd alltogether and start vsftpd in standalone mode?

Add
Code:

listen=YES
background=YES

to /etc/vsftpd/vsftpd.conf, start it via /etc/init.d/vsftpd start and rc-update add vsftpd default.
_________________
Instead of asking why a piece of software is using 1970s technology,
start asking why software is ignoring 30 years of accumulated wisdom.
Back to top
View user's profile Send private message
slurve
n00b
n00b


Joined: 31 Jul 2004
Posts: 11

PostPosted: Fri Aug 13, 2004 4:41 pm    Post subject: Reply with quote

Last step worked, thanks all!
Back to top
View user's profile Send private message
leni07
n00b
n00b


Joined: 02 Jul 2004
Posts: 22

PostPosted: Sun Aug 15, 2004 5:01 am    Post subject: Reply with quote

Hey I have gotten vsftp to work in standalone mode almost. I can connect and stuff but when i try to do an ls or cd with lftp, i get hung at

Quote:
Making Data Connection...


I log in as a regular user with lftp -u user,pass mysite.com
It connects

Quote:
lftp me@mysite.com >


but i cant really do anything after that. Can anyone help me :(
_________________
"Computers are like air conditioners, they don't work when you open windows"
~Unknown~
Back to top
View user's profile Send private message
newbie_gentoo
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 189

PostPosted: Wed Sep 08, 2004 1:30 pm    Post subject: Reply with quote

Hello.
I wanted to create an FTP server so my brother could update his site files via FTP. I have sucessfully configured vsftpd without chrooting, so that I could use a symbolic link to his website dir.
Nevertheless, I really don't like that he can go up the dir tree by doing 'cd ..' and be able to download files and everything! This is some serious security problem if anyone can get his ID.

Is there a way to configure vsftpd so that users can only see allowed dirs? Or at least not being able to download from the others?

Thanks for reading
Back to top
View user's profile Send private message
router
n00b
n00b


Joined: 24 Mar 2003
Posts: 21

PostPosted: Sun Jan 02, 2005 6:02 pm    Post subject: Reply with quote

yes I am looking for that too....
Back to top
View user's profile Send private message
toddles13
n00b
n00b


Joined: 05 Jan 2004
Posts: 72
Location: Jafaland NZ

PostPosted: Wed Jan 05, 2005 11:35 am    Post subject: Reply with quote

Thanks for the "How to" Guy
The only thing wrong is what freebaseh pointed out

freebaseh wrote:
got it working now
i change only_from = 0.0.0.0 in /etc/xinetd.conf instead for
/etc/xinetd.d/vsftpd
as mcpi wrote
hope this helps some


So the short short version is:
Install xinetd
Code:
emerge xinetd
rc-update add xinetd default

Install vsftp
Code:
emerge vsftpd

edit the file /etc/vsftpd/vsftpd.conf
add the ftpuser
Code:
groupadd ftpgroup
useradd -g ftpgroup -d /home/ftp -p password ftpuser

edit /etc/xinetd.d/vsftpd
change disable = yes to disable = no
edit /etc/xinetd.conf
add line only_from 0.0.0.0

Code:
 /etc/init.d/xinetd start



Cant seem to get the Chroot thing going. Really need to stop users gonig outside there home directories. But will leave that for another thread.


Last edited by toddles13 on Tue Jan 18, 2005 9:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
frameRATE
Guru
Guru


Joined: 28 Apr 2003
Posts: 386
Location: Orange County California

PostPosted: Tue Jan 18, 2005 9:42 pm    Post subject: Reply with quote

thanks for the howto.. got it running myself but used this to add xinetd. Much appreciate stuff like this!
_________________

Linux User | 364705

howto install coldfusion mx 7 under gentoo
Back to top
View user's profile Send private message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Sun Apr 17, 2005 6:56 pm    Post subject: Reply with quote

Someone in another thread was asking about how to set up VSFTPD for users with varying power, so I ended up writing a howto on my website.
http://gentoobox.rh.ncsu.edu/vsftpd-help.html
Back to top
View user's profile Send private message
toddles13
n00b
n00b


Joined: 05 Jan 2004
Posts: 72
Location: Jafaland NZ

PostPosted: Tue Apr 19, 2005 12:13 pm    Post subject: Reply with quote

good to hear someone made good of my ramblings, or the original postings ramblings. Good thread. More of these please.

The ultimate n00B

ME!!
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3374
Location: USA

PostPosted: Thu Apr 28, 2005 6:01 pm    Post subject: Reply with quote

destuxor wrote:
Someone in another thread was asking about how to set up VSFTPD for users with varying power, so I ended up writing a howto on my website.
http://gentoobox.rh.ncsu.edu/vsftpd-help.html


nice howto. :wink:
Back to top
View user's profile Send private message
face
n00b
n00b


Joined: 20 Mar 2004
Posts: 12

PostPosted: Sat Oct 07, 2006 12:35 pm    Post subject: Hacky solution Reply with quote

router wrote:
yes I am looking for that too....


mount --bind /var/ftp/music /home/userA/music
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Wed Oct 11, 2006 10:02 am    Post subject: Reply with quote

Bob P wrote:
destuxor wrote:
Someone in another thread was asking about how to set up VSFTPD for users with varying power, so I ended up writing a howto on my website.
http://gentoobox.rh.ncsu.edu/vsftpd-help.html


nice howto. :wink:

Unfortunately, I can't get the link to open. It just times out. Does anyone have a copy of this how-to or reasonable facsimile there of they could post?
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
mundhra
n00b
n00b


Joined: 02 Oct 2004
Posts: 7

PostPosted: Mon Oct 16, 2006 4:40 pm    Post subject: Reply with quote

dufeu wrote:
Bob P wrote:
destuxor wrote:
Someone in another thread was asking about how to set up VSFTPD for users with varying power, so I ended up writing a howto on my website.
http://gentoobox.rh.ncsu.edu/vsftpd-help.html


nice howto. :wink:

Unfortunately, I can't get the link to open. It just times out. Does anyone have a copy of this how-to or reasonable facsimile there of they could post?


link is old. try http://72.14.253.104/search?q=cache:xMISoN__WygJ:gentoobox.rh.ncsu.edu/vsftpd-help.html+http://gentoobox.rh.ncsu.edu/vsftpd-help.html&hl=en&gl=us&ct=clnk&cd=1.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks 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