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

2 Answers 2

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
2

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

4
  • This is not a guide, as there is not even one command listed there
    – shaharmor
    Jul 10, 2013 at 8:25
  • 3
    There is definitely enough in that to get it done. ServerFault isn't here to spoonfeed answers, I suggest you read our FAQ to see what sort of questions are catered for here. Jul 10, 2013 at 9:00
  • 2
    I agree, but it is also suggested to reproduce the relevant paragraphs here just in case the link breaks.
    – dawud
    Jul 10, 2013 at 11:17
  • But then again, posting a one line answer with a link is also frowned upon. Apr 8, 2019 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.