View previous topic :: View next topic |
Author |
Message |
guy Apprentice


Joined: 31 Mar 2003 Posts: 286 Location: USA
|
Posted: Thu Apr 10, 2003 8:13 pm Post subject: Howto set up an FTP (VSFTPD) |
|
|
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:
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 |
|
 |
mcpi n00b


Joined: 04 Jun 2003 Posts: 39
|
Posted: Sat Jun 21, 2003 3:07 am Post subject: still have problem with vsftpd installation |
|
|
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 |
|
 |
freebaseh n00b

Joined: 31 Jan 2003 Posts: 28
|
Posted: Sat Jun 21, 2003 9:36 pm Post subject: |
|
|
same problem here vsftpd isnt starting =( |
|
Back to top |
|
 |
freebaseh n00b

Joined: 31 Jan 2003 Posts: 28
|
Posted: Sat Jun 21, 2003 10:17 pm Post subject: works now |
|
|
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 |
|
 |
mcpi n00b


Joined: 04 Jun 2003 Posts: 39
|
Posted: Thu Jun 26, 2003 9:11 pm Post subject: |
|
|
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 |
|
 |
elMariachi n00b


Joined: 25 Jun 2004 Posts: 10 Location: Hamburg, Germany
|
Posted: Sun Jul 11, 2004 7:02 pm Post subject: |
|
|
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 |
|
 |
cryptodev n00b

Joined: 16 Apr 2004 Posts: 53
|
|
Back to top |
|
 |
neysx Retired Dev


Joined: 27 Jan 2003 Posts: 795
|
Posted: Mon Jul 12, 2004 9:25 am Post subject: |
|
|
Or do not use (x)inet if you find it too confusing. |
|
Back to top |
|
 |
Gherald2 Guru


Joined: 02 Jul 2003 Posts: 326 Location: Madison, WI USA
|
Posted: Mon Jul 12, 2004 6:31 pm Post subject: |
|
|
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 |
|
 |
neysx Retired Dev


Joined: 27 Jan 2003 Posts: 795
|
Posted: Mon Jul 12, 2004 6:53 pm Post subject: |
|
|
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 |
|
 |
qubix Tux's lil' helper


Joined: 22 Sep 2003 Posts: 146 Location: Warsaw/Poland
|
Posted: Tue Jul 13, 2004 7:45 am Post subject: |
|
|
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 |
|
 |
slurve n00b

Joined: 31 Jul 2004 Posts: 11
|
Posted: Tue Aug 10, 2004 2:07 am Post subject: |
|
|
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 |
|
 |
daff Apprentice


Joined: 02 Jul 2003 Posts: 232 Location: Vienna, Austria
|
Posted: Thu Aug 12, 2004 12:11 pm Post subject: |
|
|
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 |
|
 |
slurve n00b

Joined: 31 Jul 2004 Posts: 11
|
Posted: Fri Aug 13, 2004 4:41 pm Post subject: |
|
|
Last step worked, thanks all! |
|
Back to top |
|
 |
leni07 n00b

Joined: 02 Jul 2004 Posts: 22
|
Posted: Sun Aug 15, 2004 5:01 am Post subject: |
|
|
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 |
|
 |
newbie_gentoo Apprentice

Joined: 04 Jul 2004 Posts: 189
|
Posted: Wed Sep 08, 2004 1:30 pm Post subject: |
|
|
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 |
|
 |
router n00b

Joined: 24 Mar 2003 Posts: 21
|
Posted: Sun Jan 02, 2005 6:02 pm Post subject: |
|
|
yes I am looking for that too.... |
|
Back to top |
|
 |
toddles13 n00b


Joined: 05 Jan 2004 Posts: 72 Location: Jafaland NZ
|
Posted: Wed Jan 05, 2005 11:35 am Post subject: |
|
|
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
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 |
|
 |
frameRATE Guru


Joined: 28 Apr 2003 Posts: 386 Location: Orange County California
|
Posted: Tue Jan 18, 2005 9:42 pm Post subject: |
|
|
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 |
|
 |
wjholden l33t

Joined: 01 Mar 2004 Posts: 826 Location: Augusta, GA
|
Posted: Sun Apr 17, 2005 6:56 pm Post subject: |
|
|
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 |
|
 |
toddles13 n00b


Joined: 05 Jan 2004 Posts: 72 Location: Jafaland NZ
|
Posted: Tue Apr 19, 2005 12:13 pm Post subject: |
|
|
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 |
|
 |
Bob P Advocate


Joined: 20 Oct 2004 Posts: 3374 Location: USA
|
Posted: Thu Apr 28, 2005 6:01 pm Post subject: |
|
|
nice howto.  |
|
Back to top |
|
 |
face n00b

Joined: 20 Mar 2004 Posts: 12
|
Posted: Sat Oct 07, 2006 12:35 pm Post subject: Hacky solution |
|
|
router wrote: | yes I am looking for that too.... |
mount --bind /var/ftp/music /home/userA/music |
|
Back to top |
|
 |
dufeu l33t


Joined: 30 Aug 2002 Posts: 924 Location: US-FL-EST
|
Posted: Wed Oct 11, 2006 10:02 am Post subject: |
|
|
Bob P wrote: |
nice howto.  |
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 |
|
 |
mundhra n00b

Joined: 02 Oct 2004 Posts: 7
|
|
Back to top |
|
 |
|