# Trying to get Anonymous FTP to run in FreeBSD 9.1



## JoeSchmuck (Feb 23, 2013)

I'm having one heck of a time to get the built in ftpd to allow anonymous FTP access.

I'm creating a SVN Mirror using subversion (already done for the most part) and an anonymous FTP server in a VM.  These will be for programming and will save me time when I recompile code when I need to download source files frequently, make them local and I'm not at the mercy of my DSL modem.

I can get the FTP service to allow login of user accounts but I get "530 User ftp unknown." for the error message.  I have tried to add the user 'ftp' but it tells me that ftp is a group and cannot be a user and I have added anonymous as a user but that didn't solve the problem either and it gives "530 User anonymous unknown." which really blew my mind.

I've been pounding away at the keyboard for 2 days, searching the internet for a solution but they are all the same solutions and nothing seems to work so I'm here now asking for advice.


----------



## J65nko (Feb 23, 2013)

From ftpd(8):


```
6.	If the user name is ``anonymous'' or ``ftp'', an anonymous ftp
		account must be present in the password file (user ``ftp'').
		In this case the user is allowed to log in by specifying any
		password (by convention an email address for the user should
		be used as the password).  When the -S option is set, all
		transfers are logged as well.
```

So you really have to add an user *ftp*.


```
[cmd=#]pw useradd -n ftp -g ftp[/cmd] 
[cmd=#]grep ftp /etc/passwd[/cmd]

ftp:*:1008:14:User &:/home/ftp:/bin/sh
```

You can specify the home directory with the -b option. See pw(8)


----------



## wblock@ (Feb 23, 2013)

Or you could set up ssh keys and just use rsync(1).


----------



## JoeSchmuck (Feb 24, 2013)

For some reason I was unable to use useradd to add ftp so I did it manually.  Now it works.  I don't know what FreeBSD 8.1 never gave me this problem.

Hey, thanks for the help.  Unfortunately I didn't get an email saying someone answered my request for help and after a few more hours of internet searching today, I found the way to manually enter the user.

Now I have more problems with setting up an SVN Server (mirror) in VMWare and I get a connection refused.  I disabled the firewall of course but that didn't help.  I have some more searching on the internet before I place a post asking for help.  Maybe I'll figure it out in a few hours, maybe not.  I'm trying to run a local SVN server because my internet connection is not very fast and I'm goofing round with a program which downloads source and port files each time I rebuild.  This is really my option because I've had issues in the past where a non-virgin build would result in a failure.  You know, I did have a CVSUP server running just fine but it is a discontinued item and I never did have it setup to work with FreeBSD source files.

Again, thanks for the help.


----------

