OpenWrt Forum Archive

Topic: pure-ftpd and anonymous access

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

I'm running 7.09 and successfully use pure-ftpd in puredb mode and it work well when i provide different user names i created. However am not able to connect with anonymous account. I tried with minimal options like 
OPTIONS="-A -B -c 5 -C 4 -e -l unix" and i keep getting

421 Unable to set up secure anonymous FTP

I found one article related to Debian there mentioned a missing /tmp/ftp and after that it was working,

I have not been able to find similar information for OpenWrt and how to set default directory for anonymous but i tried /tmp/ftp with no luck.

Also i find the -e -E flag misleading - what if I want my created user names and anonymous? My guess is that neither of them should be there.

I will appreciate if someone could take time to test this

Rgds. margate

Remove the -E command-line option in /etc/default/pure-ftpd. Next you have to create a system user named 'ftp' in /etc/passwd to get anonymous FTP working. It's also important that the user has no valid shell, use /bin/false.

E.g.:

ftp:x:500:500:Linux User,,,:/srv/ftp:/bin/false

This should work then. I'm currently working on migrating the Pure-FTPd configuration to UCI. See this thread if you are interested. Works not bad so far. Only the stop() function or better the Busybox start-stop-daemon needs to be patched to work with multiple PIDs.

Spot on , anonymous goes to directory specified in /etc/passwd and authorized users to directory i entered when i created the pure-ftpd user 

Thanks

The discussion might have continued from here.