Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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

share|improve this answer
    
This is not a guide, as there is not even one command listed there – shaharmor Jul 10 '13 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. – ThatGraemeGuy Jul 10 '13 at 9:00
1  
I agree, but it is also suggested to reproduce the relevant paragraphs here just in case the link breaks. – dawud Jul 10 '13 at 11:17

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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