1

I'm running a web server with proftpd on FreeBSD 9.

I want to add few ftp users to the server so they will have the option to upload files to their own sites.

When trying to do it with proftpd i need to use the system's adduser command to first create the user in the system itself.

Is there any way to avoid it?

I read about virtual users but i can't seem to find any guide to configuring it step by step

Thanks

Castaglia
  • 3,349
  • 3
  • 21
  • 42
shaharmor
  • 337
  • 4
  • 16

2 Answers2

3

Simple ftp site

<VirtualHost ftp.example.net>
   # Common settings
   ServerName "ftp.example.net"
   DefaultRoot ~
   DefaultServer on
   Umask 002

   Protocols ftp
   Port 21

   # Specify where the server should find our users
   AuthOrder mod_auth_file.c*
   AuthUserFile /etc/proftpd/virtual_users.passwd home ^/vhosts/example.net

   # Only users alex and john will be able to login
   <Limit LOGIN>
      AllowUser alex john
      DenyAll
   </Limit>

</VirtualHost>

Create virtual users

# ftpasswd --passwd --file /etc/proftpd/virtual_users.passwd --sha512 --gid 99 --uid 99 --shell /sbin/nologin --name alex --home /vhosts/example.net/site1/public_html
# ftpasswd --passwd --file /etc/proftpd/virtual_users.passwd --sha512 --gid 99 --uid 99 --shell /sbin/nologin --name john --home /vhosts/example.net/site2/public_html
ALex_hha
  • 7,193
  • 1
  • 25
  • 40
2

Here's the guide on their site: http://www.proftpd.org/docs/howto/VirtualUsers.html.

ThatGraemeGuy
  • 15,473
  • 12
  • 53
  • 79