Formatting code for ProFTPd
{{parent page="FTP"}}
===ProFTPd knowledge===
==Installation==
Tested on proftpd-1.3.1 & CentOS 5
%%
./configure --sysconfdir=/etc --localstatedir=/var --enable-auth-pam --enable-dso
make && make install
%%
==Basic Configurations==
After the above installation, a sample config file will be created in /etc/proftpd.conf. It should be a good starter.
==chroot support==
Add these to proftpd.conf's global area
%%
DefaultRoot ~ testgp,users
%%
==Virtual user support==
First, create the proftpd.passwd and proftpd.group with the ftpasswd utility inside contrib. e.g. create a group called **testgp** and a user called **tester**
%%
ftpasswd --group --gid 5001 --file /etc/proftpd.group --name testgp
ftpasswd --passwd --file proftpd.passwd --name tester --uid 1001 --gid 5001 --home /var/ftp/tester --shell /sbin/nologin
mkdir -p /var/ftp/tester
chgrp 5001 /var/ftp/tester
chmod 755 /var/ftp/tester
%%
Finally, add these directives to proftpd.conf and restart
%%
AuthUserFile /etc/proftpd.passwd
AuthGroupFile /etc/proftpd.group
%%
== Per user setting sample==
%%
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# performance settings
UseReverseDNS off
IdentLookups off
TimeoutLogin 120
TimeoutIdle 600
TimeoutNoTransfer 900
TimeoutStalled 3600
TransferLog /var/log/xferlog
# per user setting - required mod_ifsession
<IfUser datapipe coompdim>
# disallow download
<Directory ~>
<Limit READ LIST>
DenyAll
</Limit>
</Directory>
# Limit read in the incoming directory
<Directory ~/incoming>
<Limit WRITE>
AllowAll
</Limit>
</Directory>
</IfUser>
%%
===ProFTPd knowledge===
==Installation==
Tested on proftpd-1.3.1 & CentOS 5
%%
./configure --sysconfdir=/etc --localstatedir=/var --enable-auth-pam --enable-dso
make && make install
%%
==Basic Configurations==
After the above installation, a sample config file will be created in /etc/proftpd.conf. It should be a good starter.
==chroot support==
Add these to proftpd.conf's global area
%%
DefaultRoot ~ testgp,users
%%
==Virtual user support==
First, create the proftpd.passwd and proftpd.group with the ftpasswd utility inside contrib. e.g. create a group called **testgp** and a user called **tester**
%%
ftpasswd --group --gid 5001 --file /etc/proftpd.group --name testgp
ftpasswd --passwd --file proftpd.passwd --name tester --uid 1001 --gid 5001 --home /var/ftp/tester --shell /sbin/nologin
mkdir -p /var/ftp/tester
chgrp 5001 /var/ftp/tester
chmod 755 /var/ftp/tester
%%
Finally, add these directives to proftpd.conf and restart
%%
AuthUserFile /etc/proftpd.passwd
AuthGroupFile /etc/proftpd.group
%%
== Per user setting sample==
%%
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
# performance settings
UseReverseDNS off
IdentLookups off
TimeoutLogin 120
TimeoutIdle 600
TimeoutNoTransfer 900
TimeoutStalled 3600
TransferLog /var/log/xferlog
# per user setting - required mod_ifsession
<IfUser datapipe coompdim>
# disallow download
<Directory ~>
<Limit READ LIST>
DenyAll
</Limit>
</Directory>
# Limit read in the incoming directory
<Directory ~/incoming>
<Limit WRITE>
AllowAll
</Limit>
</Directory>
</IfUser>
%%