# anonymous FTP broken with pureftpd

## gen536

Hi all

I've turned on anonymous auth in my pure ftpd server. (it's by default ?!)

When I try to log in, I get this error after the command USER anonymous :

421 Unable to set up secure anonymous FTP

Even with "-d", syslog won't help :

Jan 22 17:04:32 [pure-ftpd] (?@pda57-1-82-231-116-142.fbx.proxad.net) [ERROR] Unable to set up secure anonymous FTP

How can I fix/debug this ? Is there an incoming directory missing ? I can't find where to set it. Thanks !

Here is my config :

## This variable must be uncommented in order for the server to start ##

IS_CONFIGURED="yes"

## FTP Server,Port (separated by comma) ##

## If you prefer host names over IP addresses, it's your choice :

## SERVER="-S ftp.rtchat.com,21"

## IPv6 addresses are supported.

SERVER="-S r2d2.neofacto.lu,21"

## Number of simultaneous connections in total, and per ip ##

MAX_CONN="-c 30"

MAX_CONN_IP="-C 10"

## Start daemonized in background ##

DAEMON="-B"

## Don't allow uploads if the partition is more full then this var ##

DISK_FULL="-k 90%"

## If your FTP server is behind a NAT box, uncomment this ##

USE_NAT="-N"

## Authentication (others are 'pam', ...)##

## Further infos in the README file.

AUTH="-l unix"

## Change the maximum idle time. (in minutes. default 15)

#TIMEOUT="-I <timeout>'"

## Use that facility for syslog logging. It defaults to 'ftp'

## Logging can be disabled with '-f none' .

#LOG="-f facility"

## Misc. Others ##

MISC_OTHER="-A -x -j -R -s -d"

Thanks a lot for your help !!

----------

## gen536

*bump* please ?

----------

## derheld42

I found that I had to set the home directory for ftp to /var/ftp (my anonymous ftp directory) and then things worked.

----------

## zefram70

From pure-ftp faq: "To run an anonymous FTP server you must have a *system* account called 'ftp'. Don't give it any valid shell, just a home directory. That home directory is the anonymous area."

----------

## lcoulon

Does anyone know why i can't delete files when i connect as anomymous on my FTP ?

How solving this issue ?

I have also another problem when i connect with a registered login & password,

when uploading files, FTP reports an error when finalizing the transfer ?

Any idea regarding that problem ?

Thanks for your help

----------

## j-m

 *lcoulon wrote:*   

> Does anyone know why i can't delete files when i connect as anomymous on my FTP ?
> 
> How solving this issue ?
> 
> 

 

This is not an issue. This is by design! Anyone could delete files on your FTP. Ugh!  :Shocked:   :Rolling Eyes: 

----------

## mosquito

 *derheld42 wrote:*   

> I found that I had to set the home directory for ftp to /var/ftp (my anonymous ftp directory) and then things worked.

 

How?

When I create this directory and

```
mkdir /var/ftp

chown ftp:ftp /var/ftp

usermod ftp -d /var/ftp
```

i receive this error

```
usermod: user /var/ftp does not exist
```

----------

## tecknojunky

 *j-m wrote:*   

>  *lcoulon wrote:*   Does anyone know why i can't delete files when i connect as anomymous on my FTP ?
> 
> How solving this issue ?
> 
>  
> ...

 

 :Laughing: 

ahem, uuh... is anonymous users unable to upload files in an upload folder also a restriction by design?  :Embarassed: 

I chmod 555 /var/ftp and chmod 755 /var/ft/uploads but I can't upload poop as anonymous.

EDIT:  Forget it.  I forgot to chown ftp:ftp /var/ftp/uploads.  Stupid me  :Confused: 

----------

