# what FTP server should i use?

## itatabitovski

i need some FTP server but there must be some kind of credit system like in glftpd. I am trying to avoid glftpd because it is pain to set it up. 

thanks

----------

## MighMoS

I use pure-ftpd.  I love it.  No more needs to be said.

[edit]If I remember correctly, it forces you to edit its /etc/conf.d/pure-ftpd file though...

----------

## itatabitovski

 *MighMoS wrote:*   

> I use pure-ftpd.  I love it.  No more needs to be said.
> 
> [edit]If I remember correctly, it forces you to edit its /etc/conf.d/pure-ftpd file though...

 

ok i think i will go with pure-ftpd, i emerged it and edited the  /etc/conf.d/pure-ftpd

then i rc-update add pure-ftpd default 

but on next restart doesn't seem to be started.

since i run this server without graphic card i use only ssh to configure it makes it hard to see what is actually going on while booting.

to sum up, besides editing the file and adding new group and user in linux and adding users trough pure-pw what else do i need to run the server.

thanks

here is the pure-ftpd config file, on boot up i get this error 

Mar 15 16:15:56 low-budget pure-ftpd: (?@?) [ERROR] Unable to start a standalone server: [Invalid argument]

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) ##

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

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

## IPv6 addresses are supported.

SERVER="-S myserver.room.com,21"

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

MAX_CONN="-c 10"

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 99%"

## 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 15'"

## 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 -R -E -X -y 1:0 -r -p 20000:20200"

```

----------

## MighMoS

Hmm, it looks fine to me  :Neutral:  ...the best advice I could give would be to remove --quiet from the start line of /etc/init.d/pure-ftpd and then run it, seeing if it barfs any more useful errors.

----------

## vargen

```
SERVER="-S myserver.room.com,21"
```

Is this really your url?

----------

## itatabitovski

 *vargen wrote:*   

> 
> 
> ```
> SERVER="-S myserver.room.com,21"
> ```
> ...

 

nah   :Smile:   but does it matter ??!? btw i still have problems running the server.. ok when i run it from console it starts but with netstat -al i dont see ftp port open ?!?! 

anybody ?!?

----------

## vargen

Try changing it to your server name or ip..

----------

## itatabitovski

 *vargen wrote:*   

> Try changing it to your server name or ip..

 

already done, nothing changes

another thing.. 

/etc/init.d/pure-ftpd stop can't stop the server !!

----------

## adammc

what does rc-status have to say about it?

----------

## itatabitovski

 *adammc wrote:*   

> what does rc-status have to say about it?

 

```

low-budget root # rc-status

Runlevel: default

  sshd                                                              [ started ]

  local                                                             [ started ]

  samba                                                             [ started ]

  vixie-cron                                                        [ started ]

  syslog-ng                                                         [ started ]

  net.eth0                                                          [ started ]

  netmount                                                          [ started ]

  pure-ftpd                                                         [ started ]

low-budget root # netstat -al

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address           Foreign Address         State

tcp        0      0 *:netbios-ssn           *:*                     LISTEN

tcp        0      0 *:ssh                   *:*                     LISTEN

tcp        0      0 192.168.1.150:ssh       192.168.1.101:1485      ESTABLISHED

udp        0      0 192.168.1.15:netbios-ns *:*

udp        0      0 *:netbios-ns            *:*

udp        0      0 192.168.1.1:netbios-dgm *:*

udp        0      0 *:netbios-dgm           *:*

Active UNIX domain sockets (servers and established)

Proto RefCnt Flags       Type       State         I-Node Path

unix  2      [ ACC ]     STREAM     LISTENING     3538   /dev/log

unix  3      [ ]         STREAM     CONNECTED     3761   /dev/log

unix  3      [ ]         STREAM     CONNECTED     3760

unix  3      [ ]         STREAM     CONNECTED     3695   /dev/log

unix  3      [ ]         STREAM     CONNECTED     3694

unix  3      [ ]         STREAM     CONNECTED     3684   /dev/log

unix  3      [ ]         STREAM     CONNECTED     3683

```

and here is the /etc/conf.d/pure-ftpd file

```

# 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) ##

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

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

## IPv6 addresses are supported.

SERVER="-S low-budget.biatch.dk,1337"

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

MAX_CONN="-c 10"

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 98%"

## 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 -E -R K -O stats:/var/log/pureftpd.log -p 20000:20200 -P low-budget.biatch.dk -Q 1:2 -r -y 1:1"

```

----------

## adammc

does the machine have a local IP (i.e. LAN), or is it connected directly to your modem?  I notice you've set the passive IP manually, but you're also getting it to bind to the same IP with -S.  In my config I have:

```
SERVER="-S 192.168.1.201,21"

...

MISC_OTHER="-A -x -j -E -p 21000:22000 -P [my-ip-here]"

```

perhaps you could try something similar?

----------

## itatabitovski

 *adammc wrote:*   

> does the machine have a local IP (i.e. LAN), or is it connected directly to your modem?  I notice you've set the passive IP manually, but you're also getting it to bind to the same IP with -S.  In my config I have:
> 
> ```
> SERVER="-S 192.168.1.201,21"
> 
> ...

 

ok then just clarify this for me 

-S internal or external IP

-P internal or external IP ?Last edited by itatabitovski on Tue Mar 16, 2004 7:32 pm; edited 1 time in total

----------

## adammc

-S should be the internal IP, -P the external

----------

## itatabitovski

 *adammc wrote:*   

> -S should be the internal IP, -P the external

 

i'll give it a try right now

----------

## itatabitovski

 *adammc wrote:*   

> -S should be the internal IP, -P the external

 

done.. man you are a lifesaver, name it what you want you got it  :Smile: ) thanks a lot

----------

## adammc

 *itatabitovski wrote:*   

> done.. man you are a lifesaver, name it what you want you got it ) thanks a lot

 

glad I could help  :Smile: 

----------

## MighMoS

 *adammc wrote:*   

> -S should be the internal IP, -P the external

 Wow, I never knew that.  Thank you Mr. Adam M C

----------

## itatabitovski

 *adammc wrote:*   

>  *itatabitovski wrote:*   done.. man you are a lifesaver, name it what you want you got it ) thanks a lot 
> 
> glad I could help 

 

still need your help..

i use 

-l unix 

i create user

pure-pw useradd vbt -u ftpuser -d /ftp

and enter the pass and when i try localy says authentication failed ?!!?

----------

## adammc

hmm, I'm not sure about that...I'm the only one using it, so I just login with my normal account (i.e. using the normal useradd command).

----------

## itatabitovski

 *adammc wrote:*   

> hmm, I'm not sure about that...I'm the only one using it, so I just login with my normal account (i.e. using the normal useradd command).

 

yep i need to use virtual users and i follow the doc from pure-ftpd site to the letter but no luck. probably i am doing something wrong...

it works ok with the system user when pass trogh pure-pwconvert

----------

## itatabitovski

i will give more details what i want to do.

i need all virtual users view one common folder that will be their home for example  /ftp and to be able to browse all subfolders.

when creating them i set the home -d /ftp and i use -A in pure-ftpd configuration to chroot them to their home.

for authentication i use -l unix

what am i doing wrong ?

----------

## adammc

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

that may help you, it has instructions for setting up pretty much what you want

----------

## itatabitovski

 *adammc wrote:*   

> http://www.pureftpd.org/README.Virtual-Users
> 
> that may help you, it has instructions for setting up pretty much what you want

 

that is excately what i use for reference...

here is what i get from the ftp client.

```

[19:06:20] WinSock 2.0

[19:06:28] Connecting to 192.168.1.150

[19:06:28] Connected to 192.168.1.150 -> IP=192.168.1.150 PORT=1337

[19:06:28] 220---------- Welcome to Pure-FTPd [TLS] ----------

[19:06:28] 220-You are user number 1 of 10 allowed.

[19:06:28] 220-Local time is now 19:15. Server port: 1337.

[19:06:28] 220-This is a private system - No anonymous login

[19:06:28] 220-RATIOS ARE ENABLED FOR EVERYONE:

[19:06:28] 220-to download 2 Mb, uploading 1 Mb of goodies is mandatory.

[19:06:28] 220 You will be disconnected after 15 minutes of inactivity.

[19:06:28] USER vbt

[19:06:28] 331 User vbt OK. Password required

[19:06:28] PASS (hidden)

[19:06:28] 530 Authentication failed, sorry

[19:06:28] Connection failed

```

----------

## adammc

hmm,  then I'm not sure what's going wrong

----------

## itatabitovski

 *adammc wrote:*   

> hmm,  then I'm not sure what's going wrong

 

pfff what happens when you dont read everything to the letter...

for virtual users 

-l puredb:/path to file.

----------

## Major

ok Im trying to start the pure-ftpd deamon 

```
 /etc/init.d/pure-ftpd start

/sbin/runscript.sh: line 49: -j: command not found

 * Starting Pure-FTPd...      
```

and the /etc/conf.d/pure-ftpd looks like this 

```
 # 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) ##

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

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

## IPv6 addresses are supported.

SERVER="-S 192.168.1.3,21"

 

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

MAX_CONN="-c 10"

MAX_CONN_IP="-C 5"

 

## 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 -E -P 192.168.1.3"

 

#

# 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 ('.') ]

# -D [ List files beginning with a dot ('.') even when the client doesn't

#      append the '-a' option to the list command. A workaround for badly

#      configured FTP clients. ]

# -G [ Disallow renaming. ]

# -d [ Send various debugging messages to the syslog. ONLY for DEBUG ]

# -F <fortune file> [ Display a fortune cookie on login. Check the README file ]# -H [ By default, fully-qualified host names are logged. The '-H' flag avoids host names resolution. ]

```

can someone help me with this ?

Major

----------

## itatabitovski

 *Major wrote:*   

> ok Im trying to start the pure-ftpd deamon 
> 
> ```
>  /etc/init.d/pure-ftpd start
> 
> ...

 

i think you should add "#" in front of 

```

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

```

----------

## letoff

 *itatabitovski wrote:*   

> for virtual users 
> 
> -l puredb:/path to file.

 

Yep, here is what I have in /etc/conf/pure-ftpd:

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

## Further infos in the README file.

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

And don't forget to add -m when using 'pure-pw useradd' to automatically update pureftpd.pdb

----------

## Major

```
 # /etc/init.d/pure-ftpd stop

 * Stopping Pure-FTPd...

No process in pidfile `/var/run/pure-ftpd.pid' found running; none kille  [ !! ]

```

this is the error when Im trying to stop the deamon  ? 

I remove the --quiet to see what was the error but this does not help me much 

the way it as been start is via rc which I added 

```
 rc-update add pure-ftpd default 
```

any clue over this ?

Major

----------

## adammc

are you sure it's actually running?  if it's not, run /etc/init.d/pure-ftpd zap, then start it again

----------

## Major

yes it is running  proof :

```
 # /etc/init.d/pure-ftpd status

 * status:  started

```

```
  # rc-status | grep pure-ftpd

  pure-ftpd                                                            [ started ]

```

----------

## adammc

it's running according to rc, but what does:

```
pidof pure-ftpd
```

say about it?

----------

## Major

nothing at all ..... ????

----------

## adammc

in which case it's not actually running, so zap it as I said before and start it again

----------

## Major

I did the zap thing

```
 /etc/init.d/pure-ftpd zap

 * Manually resetting pure-ftpd to stopped state.

```

```
# /etc/init.d/pure-ftpd start

 * Starting Pure-FTPd...                                                           [ ok ]

```

but still 

```
# pidof pure-ftpd

 
```

----------

## itatabitovski

a question about ProFTPd.. If i emerge it from the portage, will it emerge with mod_ratio? if not what should i do to make that work ?

----------

