# pure-ftpd got some questions :)

## Rain Designs

well in the console I typed "emerge pure-ftpd" just to see if gentoo could find it and it did! lol now how do I run and config it?  I searched pure-ftpd site and I couldn't really find anything.  I tried to execute /usr/sbin/pure-ftpd and it didn't work.  Any ideas?

----------

## delta407

Do you have a pure-ftpd script in your /etc/init.d/? I've never used it, but that's generally where daemons go...

Anyway, check /etc/ for pro-ftpd-related things, that's how you configure it.  :Wink: 

----------

## Rain Designs

well I rebooted and typed /sr/sbin/pure-ftpd and it appears that pure-ftpd was installed, I just have to configure it, so I will take your advice! 

yeah there is a script in there, I'll check it out.

Thanks!

-Rain

Your the man delta

----------

## delta407

Use an init script (/etc/init.d/*) if at all possible, since they let you start/stop things nicely and have startup/shutdown dependency tracking (so your ftpd will start up after the network is loaded, etc.)

If it has an init script (which I'm betting it does), just "rc-update add pure-ftpd [or whatever] default" and it'll launch automagically on startup.

----------

## Rain Designs

all I could find in /etc was ftpusers, there seems to be nothing else in there.  I'll search usr and get back to you

well I found a lot of stuff in /usr/sbin and a lot of it contained chars that looked really funky.  All I edited was an html doc lol.  I'm just gonna read the website.  I tried to connected to "ftp://192.168.0.4" in IE but no worky  :Sad: 

Thanks man, your the best

-Rain

----------

## kipper

There should be a script called pure-ftpd in /etc/conf.d that you should edit.  In this script most of your server settings can be set.  Once this script is edited to your satisfaction, you can add pure-ftpd to your boot sequence by typing

#rc-update add pure-ftpd default

If you are going to be using virtual users (highly recommended) you will need to add a new group called ftpgroup and a user called ftpuser.  Once the group is created you can start adding virtual users.

the authorization file will be in /etc/pureftpd.pdb  (needed for the script in /etc/conf.d)

e.g.

#groupadd ftpgroup

#useradd -g ftpgroup -d /dev/null -s /etc ftpuser

Let's create "joe", whoose home directory will be /home/ftpusers/joe . The

system account associated with "joe" is "ftpusers".

#pure-pw useradd joe -u ftpuser -d /home/ftpusers/joe

Check out www.pureftpd.org for details.

cheers,

kipper[/url]

----------

## Rain Designs

I set in the conf.d script to allow only anonous users (just to see if I could even get it up and running) I started pure-ftpd via "/usr/sbin/pure-ftpd &" and I got back:

"[1] 3366"

"#" and I'm back at the console.  I then goto my windows box and try to goto "fpt://192.168.0.4" and its not found.

Any Ideas??

Thanks  :Smile: 

-Rain

I looked at their site, and I couldn't really find any configuration docs.  :Sad: 

----------

## delta407

Use the init scripts. Occasionally (okay, often) Gentoo config files are in non-standard locations (/etc/conf.d/ is not the usual place), and often the new locations are specified on the command line.

```
# /etc/init.d/pureftpd start
```

Then, if you still get problems, look for a log file that might give you more information.

----------

## Rain Designs

ok I did that and it said I had to edit /etc/conf.d/pure-ftpd lol, I missed some really important stuff in there, so I editted the file and I tried to connect in my windows computer, still doesn't work  :Sad:   When I executed /etc/init.d/pure-ftpd start it started ok, but I still couldn't connect  :Sad:   I think its something wrong with my config.  Any other ideas?

Thanks  :Smile: 

-Rain

----------

## Zu`

 *Rain Designs wrote:*   

> 
> 
> I looked at their site, and I couldn't really find any configuration docs. 

 

http://www.pureftpd.org/README

It's really not that hard to find and it has all the answers you need to set up Pure-FTPd successfully.

You'll have to read it yourself, but since I read it here's a few pointers:

Did you create /home/ftp ?

Do you have a system account named 'ftp' ?

The docs will help you out with this.

Also, try checking your ftp server with a real ftp client rather than a browser so you can see the error messages.

Good luck.Last edited by Zu` on Tue Jul 09, 2002 10:29 pm; edited 1 time in total

----------

## delta407

Can you "ftp localhost"?

----------

## Rain Designs

I did "ftp localhost" and I got:

ftpd: connect: connection refues

ftp>

sorry zu  :Sad:  I thought that that was just on installation, my bad, but thanks for the help!

Thanks  :Smile: 

Rain

----------

## Rain Designs

well I followed the directions and I still don't have anything  :Sad: 

off topic a little, how do I emerge sshd (emerge sshd) didn't work and (/etc/rc.d/init.d/sshd start) didn't either, so I'm assuming ssh isn't installed.

Thanks  :Smile: 

-Rain

----------

## delta407

 *Rain Designs wrote:*   

> well I followed the directions and I still don't have anything 

 

If you're getting a "connection refused" on localhost that means your FTPd isn't listening on the standard port. Either you configured it differently, or you b0rked your configuration file so it pukes on load. Check your logs. (Poke around in /var/log/ with less.)

 *Rain Designs wrote:*   

> off topic a little, how do I emerge sshd (emerge sshd) didn't work and (/etc/rc.d/init.d/sshd start) didn't either, so I'm assuming ssh isn't installed.

 

It is installed, but the init scripts are in /etc/init.d/, not /etc/rc.d/init.d/. (Also, when you fire it up for the first time it'll do all kinds of nifty things -- like generating a set of keys -- that are un-fun to do manually. Ergo, use the init scripts!)

----------

## Rain Designs

so set up ssh to boot up, do I just do:

rc-update add sshd default 

and in my logs I'm getting this:

[INFO] New connection from 192.168.0.5 (my windows machine)

[ERROR] unable to set up secure anonymous FTP

so I'm asuming I gotta reconfig something.  I'll see what I can do.

in /etc/conf.d/pure-ftpd which is the main script, there is a line like this:

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

AUTH="-l unix"

and maybe that should be changed

Thanks a lot delta  :Smile: 

-Rain

----------

## delta407

 *Rain Designs wrote:*   

> so set up ssh to boot up, do I just do:
> 
> rc-update add sshd default

 

Right.

 *Rain Designs wrote:*   

> and in my logs I'm getting this:
> 
> [INFO] New connection from 192.168.0.5 (my windows machine)
> 
> [ERROR] unable to set up secure anonymous FTP

 

Sounds like a configuration issue to me. You might be able to find manpages on it...

----------

## Rain Designs

well sshd works  :Smile:  but I'm still havin problems with pure-ftpd, I just gotta configure users file I think, I hope lol.

Thanks a lot delta, your the man

-Rain

----------

## delta407

 *Rain Designs wrote:*   

> Thanks a lot delta, your the man

 

No I'm not. Besides, "you're" grammar is wrong.  :Wink: 

----------

## Rain Designs

yeah yeah yeah, just accept the compliment and be dont with it!

 :Wink: 

----------

## shakti

this will help, it helped me.

http://www.pureftpd.org/README.Virtual-Users

----------

## Rain Designs

to get pure ftpd to boot at start usually you would do rc-update pure-ftpd default right, well what if I use this command to start ftpd:

/usr/sbin/pure-ftpd -j -l puredb:/etc/pureftpd.pdb &

rather than just /usr/sbin/pure-ftpd?

Thanks  :Very Happy: 

-Rain

----------

## delta407

 *Rain Designs wrote:*   

> to get pure ftpd to boot at start usually you would do rc-update pure-ftpd default right

 

Right.

 *Rain Designs wrote:*   

> well what if I use this command to start ftpd:
> 
> /usr/sbin/pure-ftpd -j -l puredb:/etc/pureftpd.pdb &

 

I don't know how many times I've said this: use the freaking init scripts! Run "/etc/init.d/pure-ftpd start" instead, you will end up a lot happier.

Example: say you change /etc/conf.d/net, you can run "/etc/init.d/net.eth0 restart" to load the new configuration. But, all your network services will still be listening on the old IP! Well, the Gentoo folk though of that, so when you restart your network interface all of your services restart too. But, they won't do that if you didn't use /etc/init.d/* to start them.

Again, just one more time:

Use the init scripts!

I feel better.  :Wink: 

----------

## klieber

uh oh.  You made delta407 pull out the trout.  I think you'd better use the scripts.

 :Smile: 

----------

## delta407

LOL!

...we need a trout emoticon.  :Wink: 

----------

## Rain Designs

sorry delta   :Embarassed:   I'm still a little confused.  I edited  /etc/init.d/pure-ftpd so that the command in there was what I wanted.  Then I added it to the boot, but the command that I wanted to be included did not work.

Sorry   :Embarassed: 

-Rain

----------

## delta407

What, exactly, did you do to the init script?

----------

## Rain Designs

ok pure-ftpd runs at boot!  but how can I allow people to connect via MSIE?

Thanks

-Rain

----------

## rac

 *Rain Designs wrote:*   

> how can I allow people to connect via MSIE?

 

What happens when they try?  Can other passive-mode FTP clients connect?

----------

## Rain Designs

when I type ftp://192.168.0.4 I get this in html:

FTP root at 192.168.0.4

I can connect to my ftp server using software, but I can't in IE.

I have my ftp server setup to run virtual users.  That require a login/password.  I would like them to be prompted with a login once they connect to my server.

Thanks  :Smile: 

-Rain

----------

## klieber

 *Rain Designs wrote:*   

> when I type ftp://192.168.0.4 I get this in html:
> 
> FTP root at 192.168.0.4
> 
> I can connect to my ftp server using software, but I can't in IE.

 

I'm confused -- you say you can't log in using IE, but from what you've posted above, it looks like you can.  If you enter:

```
ftp://192.168.0.4
```

in IE, do you get:

```
FTP root at 192.168.0.4
```

as you stated above?  Or, do you get something else?  Also, you might try entering:

```
ftp://username@192.168.0.4
```

in IE to tell IE what username to pass to the FTP server.  IE should prompt you for a password.  If you're on a local LAN and not all that concerned with security, you can also simply enter:

```
ftp://username:password@192.168.0.4
```

but beware that that information will show up in your IE cache and perhaps some other places as well.

--kurt

----------

## alec

You don't need to edit /etc/init.d/pure-ftpd.  There is absolutely no reason to because all configuration can be done through (and must be done through) /etc/conf.d/pure-ftpd.

```
# Config file for /etc/init.d/pure-ftpd

##Comment variables out to disable its features, or change the values in it... ##

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

IS_CONFIGURED="yes"

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

SERVER="-S 192.168.1.5,21"

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

MAX_CONN="-c 7"

MAX_CONN_IP="-C 2"

## Start daemonized in background ##

DAEMON="-B"

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

DISK_FULL="-k 95%"

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

USE_NAT="-N"

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

AUTH="-l puredb:/etc/pureftpd.pdb"

## Misc. Others ##

MISC_OTHER="-E -x -j -R -Fmotd -Ostats:/var/log/pureftpd.log -W -t:64"

#

# Use these inside $MISC_OTHER

# More can be found on "http://pureftpd.sourceforge.net/README"

#

# -A [ chroot() everyone, but root ]

# -e [ Only allow anonymous users ]

# -E [ Only allow authenticated users. Anonymous logins are prohibited. ]

# -i [ Disallow upload for anonymous users, whatever directory perms are ]

# -j [ If the home directory of a user doesn't exist, auto-create it ]

# -M [ Allow anonymous users to create directories. ]

# -R [ Disallow users (even non-anonymous ones) usage of the CHMOD command ]

# -x [ Authenticated users can read/write files beginning with a dot ('.')

#       Anonymous users can't, for security reasons ]

# -X [ Users can't write/read files and directories starting with a dot ('.') ]

```

That's mine - it works.  Seriously, go over to the pure-ftp site and print off the readme.  It's not like it's hidden.  Everything is straightforward.  Very helpful.

----------

## kipper

Alec has it right.  Use his example.  Once you have configured everything properly in /etc/conf.d/pure-ftpd, added all your virtual users to the database and performed your rc-update, pure-ftpd will start at boot time with all your required settings.  I have had no problems with any connections using this method.

cheers,

kipper

----------

## Rain Designs

ok, pureftpd boots at start and works ONLY if I use an ftp client (works meeing I can transfer files) ftp://192.168.0.4 CONNECTS, but I cannot transfer files.  ftp://user@192.168.0.4 WORKS but I can't transfer anything neither does user:password.  Trust me I have gone over the ENTIRE site at pure-ftpd.  And I still don't know hoto get IE workin.  I would like to have the user be prompted for a login/password if this is possible.

Thanks for the help   :Very Happy: 

-Rain

----------

## delta407

Try disabling "folder view for FTP sites" in IE and/or telling pure-ftpd to be broken (turning on hacks for buggy clients). Those are just wild guesses, but I'm pretty sure it's IE's fault, so try putzing with it until something works.  :Wink: 

----------

## alec

 *delta407 wrote:*   

> I'm pretty sure it's IE's fault

 

Of course :)

Seriously, though, you probably need to turn on 'broken client compatability' like delta suggested.

----------

## Naughtyus

 *Quote:*   

> ## FTP Server,Port (separated by comma) ## 
> 
> SERVER="-S 192.168.1.5,21" 

 

For a server on DHCP, what would I enter instead?  The following lines don't seem to work properly.

SERVER='-S *.*.*.*,21"

----------

## Rain Designs

my box is running dhcp as well, but it works.  I'm not too sure why it doesn't work in IE but it does work using an ftp client.

-Rain

----------

## Naughtyus

Did you use

*.*.*.*,21

or something else?

( 127.0.0.1,21 ?)

----------

## Zu`

 *Naughtyus wrote:*   

>  *Quote:*   ## FTP Server,Port (separated by comma) ## 
> 
> SERVER="-S 192.168.1.5,21"  
> 
> For a server on DHCP, what would I enter instead?  The following lines don't seem to work properly.
> ...

 

IIRC, you should use 0.0.0.0,21

----------

