HOWTO: Setup a Pure-FTPd server with virtual users

Hi,
i have some error message. When pure-ftpd starting "Unable to find the 'ftp' account" and when try to connect "Unable to read the indexed puredb file...". Where did i go wrong?
 
I create ftp account and now it's ok for starting. But only when connect to server get message "Unable to read the indexed puredb file..."
 
Run
Code:
ls -l /usr/local/etc/pureftpd.pdb
and post the output.

Btw, to create the ftp account did you use:
Code:
# pure-pw useradd randomnewuser -u vftp -g vftp -d /usr/home/vftp/randomnewuser
# pure-pw mkdb
 
For ls -l /usr/local/etc/pureftpd.pdb

Code:
-rw-------  1 root  wheel  2188 May  2 13:21 /usr/local/etc/pureftpd.pdb

Trying with your command and some else but the message is the same.
 
For cat /var/log/xferlog all message are same.

Code:
May  2 13:21:18  newsyslog[611]: logfile first created
May  2 13:24:23  pure-ftpd: (?@192.168.1.21) [INFO] New connection from 192.168.1.21
May  2 13:24:23  pure-ftpd: (?@192.168.1.21) [ERROR] Unable to read the indexed puredb file (or old format detected) - Try pure-pw mkdb
 
hi

I installed pure-ftpd with Mysql in my fedora 12.
In have the following value in my pure-ftpd.conf file

Code:
# Cage in every user in his home directory
ChrootEveryone yes

It was created the user folders with permission 644.
But i need to change this to 775 at the time of creating the folder.


Any ideas?
 
tangram said:
If bob, john and peter are added to the vftp Pure-FTPd virtual user database.

An file upload by john will typically send the file to [cmd=]/home/john/[/cmd] and permissions such as:

Code:
-rw-r--r--  1 john  john  1131291 Apr 15 22:31 random-file

An file upload by peter will typically send the file to [cmd=]/home/peter/[/cmd] and permissions such as:

Code:
-rw-r--r--  1 peter  peter  1131291 Apr 15 22:31 random-file

I need to change [ rw-r--r-- ] to [ rw-rw--r-- ] at the time of creating the user's folder.
can any one help me ?
 
How come I can't add users with root uid and gid? Can I somehow change that in the config file?

Code:
babylonia# pure-pw useradd alen -u alen -g alen -d /usr/home/alen
You must give (non-root) uid and gid
 
I have a few questions about pure-ftpd.
1. How can I hide the default directory files on the ftp server?
2. Do you know where I can find the commands to edit my ftp server?
 
All good worked just fine for me, but I have a question: how to set up a single user with two home directories?
 
Hello
I installed FreeBSD 10.1 and started to setup the Pure-FTPD and iI reached a point where iI should add users by using the command # pure-pw useradd user -u vftp -g vftp -d /usr/home/vftp/user but when iI press enter iI got this message:
Code:
#pure-pw: Command not found
pPlease advise me where is the preoblem.
Thanks.
 
Hello
I installed FreeBSD 10.1 and started to setup the Pure-FTPD and iI reached a point where iI should add users by using the command # pure-pw useradd user -u vftp -g vftp -d /usr/home/vftp/user but when iI press enter iI got this message:
Code:
#pure-pw: Command not found
pPlease advise me where is the preoblem.
Thanks.

I did pkg install pure-ftpd followed by which pure-pw and found it is /usr/local/bin/pure-pw. By any chance are you using non-standard shell settings that would exclude /usr/local/bin:/usr/local/sbin from PATH? What does echo $PATH say?

EDIT: Just noticed the comment in your output. The # just signifies you are at a root shell when you run those commands. Don't use an explicit #pure-pw, use pure-pw.
 
After spend almost 48 hours trying fix same errors reported here on this thread, I come to share my findings for in future people reading this, do not spend so much time searching the solution.

People getting the error:

Code:
"Unable to find the 'ftp' account"

Is because you have uncommented the Antiwarez without read the requirements (need an ftp account), to fix it:

Code:
AntiWarez no

or

Code:
# AntiWarez yes

For people getting:

Code:
"ECONNREFUSED - Connection refused by server"

Is because you have enabled CallUploadScript to yes and have not setup it, to fix it:

Code:
CallUploadScript no

or

Code:
# CallUploadScript yes

After setup the upload script (example to use antivirus) you can remove the comment tag (#) or change to yes.

PS.: I know the thread is old, but is on the first page from Google if search for: freebsd pure-ftpd
 
Dear All,

I want to ask about allow few IP list of pure-ftpd
/usr/local/etc/pure-ftpd.conf
# IP address/port to listen to (default=all IP addresses, port 21).

Bind 0.0.0.0,2134
# Bind 116.254.100.33, 2134
# Bind 116.254.100.33, 2134

is this the right command?

*im new to the game
 
is this the right command?
Impossible to say if you don't tell us what your intention is. Generally speaking: if you are not sure about a setting then just go with the default (note: what you're sharing is not the default on FreeBSD). Usually this means to leave the option commented out.
 
Impossible to say if you don't tell us what your intention is. Generally speaking: if you are not sure about a setting then just go with the default (note: what you're sharing is not the default on FreeBSD). Usually this means to leave the option commented out.

sorry for the late respon, my intention is to only allow few IP's of the routers. This FTP for auto config backup router, so only few IP (router) that allow to access, upload, or download from ftp server through pure-ftpd. Now how is the config on the pure-ftpd to only allowing few IP's?

cause im trying to edit the config, but it cant be done, only allow 1 IP to allow
/usr/local/etc/pure-ftpd.conf
# IP address/port to listen to (default=all IP addresses, port 21).

Bind 116.x.x.12,2134
Bind 116.x.x.x13,2134
 
my intention is to only allow few IP's of the routers. This FTP for auto config backup router, so only few IP (router) that allow to access, upload, or download from ftp server through pure-ftpd. Now how is the config on the pure-ftpd to only allowing few IP's?
That's not something you can (nor should) configure with pure-ftpd nor any other ftp server; set up a firewall instead and configure it to only allow access to port 21 from a few specific hosts. What you can configure with pure-ftpd is which user accounts are allowed to log on.

The Bind option you tried to use is only meant to actually bind ("assign") the ftp server to a specific IP address; this is only useful if your server has more than one IP address and you don't want the ftp server to be available on all those addresses. Simple example: usually the ftp server would be accessible on your public IP address as well as localhost (127.0.0.1), so setting Bind to 127.0.0.1 would make the server only accessible on the localhost.

Still: you don't even need pure-ftpd to set up an FTP server though. FreeBSD provides one in the base system, ready to use and it'll be a lot easier too. See this link for instructions.

As mentioned; blocking the server from remote hosts needs to be done with a firewall. FreeBSD provides three, so just set up the one you think is best, see this link for information on that. On a personal note I think you can't go wrong with PF. It's relatively easy to set up, well documented and the default firewall of OpenBSD.
 
That's not something you can (nor should) configure with pure-ftpd nor any other ftp server; set up a firewall instead and configure it to only allow access to port 21 from a few specific hosts. What you can configure with pure-ftpd is which user accounts are allowed to log on.

The Bind option you tried to use is only meant to actually bind ("assign") the ftp server to a specific IP address; this is only useful if your server has more than one IP address and you don't want the ftp server to be available on all those addresses. Simple example: usually the ftp server would be accessible on your public IP address as well as localhost (127.0.0.1), so setting Bind to 127.0.0.1 would make the server only accessible on the localhost.

Still: you don't even need pure-ftpd to set up an FTP server though. FreeBSD provides one in the base system, ready to use and it'll be a lot easier too. See this link for instructions.

As mentioned; blocking the server from remote hosts needs to be done with a firewall. FreeBSD provides three, so just set up the one you think is best, see this link for information on that. On a personal note I think you can't go wrong with PF. It's relatively easy to set up, well documented and the default firewall of OpenBSD.

Thank you so much, it explained everything sir. Which firewall do you think the best on FreeBSD? PF or IPFW?
 
After spend almost 48 hours trying fix same errors reported here on this thread, I come to share my findings for in future people reading this, do not spend so much time searching the solution.

People getting the error:

Code:
"Unable to find the 'ftp' account"

Is because you have uncommented the Antiwarez without read the requirements (need an ftp account), to fix it:

Code:
AntiWarez no

or

Code:
# AntiWarez yes

For people getting:

Code:
"ECONNREFUSED - Connection refused by server"

Is because you have enabled CallUploadScript to yes and have not setup it, to fix it:

Code:
CallUploadScript no

or

Code:
# CallUploadScript yes

After setup the upload script (example to use antivirus) you can remove the comment tag (#) or change to yes.

PS.: I know the thread is old, but is on the first page from Google if search for: freebsd pure-ftpd

Helped me with the "Unable to find the 'ftp' account" error, thanks.
 
Back
Top