# basic proFTPd

## remix

ok, i got my apache to work, i can type in the domain name in any browser www.inkfluts.com and it will open the default apache page. great.

now i want ftp access, so i can ftp real web files to that directory. 

i'm currently reading this 386 page printout of the proFTPd user manual, and lots of the terms i don't even know, i'm a straight newb. 

please help me. 

i got proFTPd emerged and working (sort of) i used all default settings from this other printout, i think from gentoo proFTPd wiki thing site. and so far i can only connect to the server with my ftp program using anyonymous logon, and it goes to public_ftp directory,,, i think. so how do i have it so that the root of the ftp directory is the web root? and i can login with a user name ... and possibly a second user name. and start FTPing away?

i'm a real newb, so please go easy as i don't know all terms just yet.

i also have the server in a different room, which will make it hard for me to run back and forth retyping my config file in here.  :Smile: 

----------

## dsd

 *remix wrote:*   

> i got proFTPd emerged and working (sort of) i used all default settings from this other printout, i think from gentoo proFTPd wiki thing site.

 

You need to be more specific.  here's a basic config:

```
ServerName          "ProFTPD Default Installation"

ServerType          standalone

DefaultServer       on

RequireValidShell   off

AuthPAM             off

AuthPAMConfig       ftp

Port                            21

Umask                           022

MaxInstances                    30

User                            proftpd

Group                           proftpd

<Directory />

  AllowOverwrite                on

</Directory>
```

next, restart proftpd and then try and login with normal user account details (i.e. details that you can log on at the console with). this won't work for root, so use a normal user. you should get taken right to your homedir.

you then need to change permissions of /var/www/localhost/ so that your user can write there. you can then browse to that directory in the ftp, or make your own symlink from your home directory. note that this probably isnt the best way of doing this, but it's worth getting it going like this first.

you can then upload html docs etc and access them over apache.

 *Quote:*   

> i also have the server in a different room, which will make it hard for me to run back and forth retyping my config file in here. 

 

have you ever heard of ssh/sshd? on the server:

```
/etc/init.d/sshd start
```

on the client

```
ssh username@server.ip
```

or if you are on windows, download putty and use that to connect

you'll then have a console from your server on your client computer

----------

## Hayl

i have a ProFTPD How-to here.

----------

## vcihon

Could anyone explain this:

 *Quote:*   

> 
> 
> you then need to change permissions of /var/www/localhost/ so that your user can write there. you can then browse to that directory in the ftp

 

I want to know how to do this securely.

Currently, ownsership of /var/www/localhost/* is root:root with permissions as rwx:rw:rw

Same with subdirectories except for horde which is apache:apache.

Can I make it all apache:apache and put my users in the apache group?

Also, if I later make a virtual website for another domain, should I put the root of that domain in the users shell /home directory?  I wasn't planning on providing a true shell acount.

Thanks.

----------

## remix

i have a box with ssh enable, i got it to work, i want to make it monitor/keyboardless, but, when it boots up, to get it on the network, i always have to do this

# modprobe sis900

# dhcpcd eth0

then it works, how do i make it so it brings eth0 on bootup like its supposed to?

also i have a seperate disk, 1 whole partition, that i formatted with reiserfs, and mounted to a directory called /server, if i wanted this disk to act as my /var/www/localhost/  directory, do i use symlink? or mount that partition to /var/www/localhost/  ?

----------

## sobers_2002

 *Quote:*   

> rc-update add eth0 default

 

to enable net with bootup[/quote]

----------

## remix

```
* /sbin/rc-update: /etc/init.d/eth0 not found; aborting. 
```

 :Confused: 

----------

## vcihon

its net.eth0 however this is really not on topic.

Anyone for my apache/ftp permissions???

----------

## remix

```
 * net.eth0 already installed in runlevel default; skipping

```

 :Confused: 

ok so now i need the machine to detect my ethernet adapter on bootup so everything can actually start (apache, proftp, ssh, etc.) 

i understand that these services are ones that would pretty much need the computer to be on ALL the time, so whats the use of needing to have stuff start properly on bootup if i wont ever shut down? well i'm planning on moving this box to another location with fast upstream connection and *free* electricity, so when i'm not there and it accidentally loses power, then someone, anyone, can just turn it back on manually and boom i'm up and online again...

----------

## Nuke Waste

 *vcihon wrote:*   

> Anyone for my apache/ftp permissions???

 

I just got my Apache server up and running as a test server for a web site I'm working on at work.  Anyway, this is how I took care of permissions:

1. I added  "webmaster" to my /etc/group file (w/ group ID 232323)

2. I then added my normal username to that group

3. Change the group ownership of your http root (/var/www/localhost) to the new webmaster group

4. Change the permissions of the entire directory to 775 (full access for the owner and group, read only for others).

Here is the code for all of this:

```

nano /etc/group  # add "webmaster" and a group id

chgrp -R webmaster /var/www/*

chmod -R 775 /var/www/*

```

----------

## Lasitus

 *Hayl wrote:*   

> i have a ProFTPD How-to here.

 

Great howto!  I was looking for a good chroot jail config.

Thanks

----------

## jrperiod

I know this is old but I tried the HowTO,but I am unable to upload to my upload folder.  Ive tried to use the EXAMPLE conf file and it gave errors, so here is mine

```
# This is a basic ProFTPD configuration file (rename it to 

# 'proftpd.conf' for actual use.  It establishes a single server

# and a single anonymous login.  It assumes that you have a user/group

# "nobody" and "ftp" for normal operation and anon.

ServerName          "ProFTPD"

ServerType          Standalone

DefaultServer       on

RequireValidShell   off

AuthPAM             off

AuthPAMConfig       ftp

TimeoutNoTransfer 20

TimeoutStalled 10

TimeoutLogin 20

TimeoutIdle 1200

# Port 21 is the standard FTP port.

Port            21

#Jail all users

DefaultRoot ~

# To prevent DoS attacks, set the maximum number of child processes

# to 30.  If you need to allow more than 30 concurrent connections

# at once, simply increase this value.  Note that this ONLY works

# in standalone mode, in inetd mode you should use an inetd server

# that allows you to limit maximum number of processes per service

# (such as xinetd).

MaxInstances         30

# Set the user and group under which the server will run.

User            ftpjrk1lla

Group            ftp-users

<Directory />

   Umask 022 022

   AllowOverwrite off

   <Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>

      DenyAll

   </Limit>

</Directory>

<Directory ~/download/*>

   Umask 022 022

   AllowOverwrite off

   <Limit MKD STOR DELE XMKD RNEF RNTO RMD XRMD>

      DenyAll

   </Limit>

</Directory>

<Directory> ~/upload/*>

   Umask 022 022

   AllowOverwrite on

   <Limit MKD XMKD RNRF RNTO DELE RMD XRMD STOR>

      AllowAll

   </Limit>

</Directory>

```

Any Ideas?

----------

## nobspangle

 *remix wrote:*   

> 
> 
> ```
>  * net.eth0 already installed in runlevel default; skipping
> 
> ...

 

```
for foo in /etc/modules.autoload.d/*; do echo sis900 >> $foo; done
```

That should fix you up

----------

## jrperiod

Anybody with any ideas of why I cant upload to my upload folder when i log into the ftp

----------

## mudrii

 *jrperiod wrote:*   

> Anybody with any ideas of why I cant upload to my upload folder when i log into the ftp

 

check chmod  writs to your upload directory

----------

