You are not logged in.

#1 2009-06-03 17:27:24

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

[SOLVED] Setting up a FTP server

Hai all :>
i'm trying to setup a local FTP server which is running on my home server. my aim is to provide a ftp server which allows everyone within my locale network to connect and upload stuff (= read- + writable for everyone who has logged in)

i've already tested vsftpd and worked through the wiki page:
http://wiki.archlinux.org/index.php/Ver … simpler.29

connecting works but i can't either create nor upload anything. do i have to add more things to my configfile or does vsftp disallows uploading by default?

best regards :>

Last edited by arch0r (2009-06-04 19:55:59)

Offline

#2 2009-06-03 17:31:51

rebugger
Member
From: Germany
Registered: 2007-10-28
Posts: 229

Re: [SOLVED] Setting up a FTP server

You have
write_enable=YES
in your config? (as mentioned in the article)

Offline

#3 2009-06-03 17:52:28

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: [SOLVED] Setting up a FTP server

cat /etc/vsftpd.conf

listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
tcp_wrappers=YES

it's kinda weird oO. i can't even login after a reboot

Offline

#4 2009-06-03 17:59:27

rebugger
Member
From: Germany
Registered: 2007-10-28
Posts: 229

Re: [SOLVED] Setting up a FTP server

check if it's really running

netstat -tulpen

then check, if it has a debugging/verbose mode

Offline

#5 2009-06-03 18:03:05

rebugger
Member
From: Germany
Registered: 2007-10-28
Posts: 229

Re: [SOLVED] Setting up a FTP server

Look what i found in the original vsftp.conf

# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES

Offline

#6 2009-06-03 18:03:25

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: [SOLVED] Setting up a FTP server

ready, up and running

netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 0.0.0.0:21              0.0.0.0:*               LISTEN      0          24678      4198/vsftpd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          7962       3673/sshd

Offline

#7 2009-06-03 18:05:11

rebugger
Member
From: Germany
Registered: 2007-10-28
Posts: 229

Re: [SOLVED] Setting up a FTP server

so add

anon_upload_enable=YES
anon_mkdir_write_enable=YES

to your config

Offline

#8 2009-06-03 18:10:04

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: [SOLVED] Setting up a FTP server

ok thx, but i can't still connect to the ftp server sad
it just tells me that the service is not avaible/remote host has closed the connection -.-

Offline

#9 2009-06-03 18:13:20

rebugger
Member
From: Germany
Registered: 2007-10-28
Posts: 229

Re: [SOLVED] Setting up a FTP server

restart the service, check your config, check your /etc/hosts.deny and /etc/hosts.allow

Offline

#10 2009-06-03 18:14:25

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Setting up a FTP server

If that is everything in your FTP dir, it's quite minimal...

Vsftpd has to be run through xinetd by default. If you don't want that, you need to set the standalone option in the configuration file. Since you don't mention anything about launching it through xinetd, I am assuming you are trying to run it standalone without specifying it in the configuration file.

If you really have such a basic config, keep in mind those comments are there for a purpose - to explain what an option does. It's nice if you all know it by heart, but it's easier to have the reference right on top of the concerned configuration flag rather than stashed away in some manual or readme wink. Yes... I know I'm nagging roll


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#11 2009-06-03 18:39:54

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: [SOLVED] Setting up a FTP server

ok fine :>
vsftp is running in standalone mode now (just started vsftp using the default config file tongue) and i can connect as an anonymous user :>
but there's still one thing missing: do i have to change the permission of /srv/ftp "by hand" or does a config file manage this?

Offline

#12 2009-06-03 20:54:43

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Setting up a FTP server

tongue

I think you have to chown the directory to make it writeable by vsftpd, if you want users to be able to upload to it.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#13 2009-06-04 19:55:37

arch0r
Member
From: From the Chron-o-John
Registered: 2008-05-13
Posts: 597

Re: [SOLVED] Setting up a FTP server

finally it's working. thx a lot to everyone :>

here's the /etc/vsftpd.conf

listen=YES
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_root=/srv/ftp
anon_upload_enable=YES
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
ftpd_banner=Welcome on bla ftp
local_umask=022
anon_world_readable_only=NO

it allows an anonymous user to connect, upload data, create/delete files and directories (... you can do just everything tongue. but i don't mind, this server is running within the intranet)
you have to change the file permissions to modify anything on the server. either you chown a user to the directory or chmod it :>

best regards cool

Last edited by arch0r (2009-06-04 20:33:14)

Offline

#14 2009-06-11 13:24:34

Thoht
Member
From: Sweden
Registered: 2008-02-02
Posts: 75

Re: [SOLVED] Setting up a FTP server

Not sure if it's okay to post in a topic that's been [SOLVED], feel free to correct me if I'm doing it wrong. :-)

I just set up a webserver at home with SSH, Apache and VSFTPD. Now I'm doing this for my brother, because I figured if I only pay for his domain name and not also a webhotel I'll be saving alot of money(!). He wants to run like, two blogs, one for his baby kid and one for himself. Myself I want to learn python, people tell me django is the way to learn it(?) and since most service providers favour Rails it's a no go here.

1) Now I got the domain connected to the server through a dynamic DNS service, and it displays the webpage located in /srv/http. In the /srv directory there is also the /ftp folder, which I reach by simply going to ftp://mydomainname.com/ in Firefox. However, if I connect to the FTP server through Transmit (Mac OS X client) I need to enter my login credentials (same as for logging in via SSH, I ain't got no separate user table for the FTP) and I end up in my homefolder. I suppose that's nice (I dunnu really) since if you could enter like, ftp://mydomainname.com/thoht, and have access to my home directory that'd be awesome. How do I configure it to be like that?

2) For the websites though (I take it FTP and WWW are different things now and stored separetely) I'd rather have it stored where it is, so that I may create custom folders beneath. On the other hand what if I got several domain names, and subdomain names? If I go to mydomainname.com in Firefox I end up on the index.html page in the /srv/http folder. Shouldn't I be able to store several folders named correspondingly to the specific domain name in there?

Thanks in advance!


Credit to KiwiesRuleXD @ DeviantArt for the avatar.

Offline

#15 2009-06-11 15:04:28

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Setting up a FTP server

It's not okay.

Don't hijack topics please. Open your own.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

Board footer

Powered by FluxBB