Re: [Proftpd-user] ProFTPd - virtual users + single ftp location

Metal Slug <[email protected]> Sat, 16 Aug 2025 21:35:25 +0800
Newsgroups gmane.network.proftpd.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============4707079716318985418==
Content-Type: multipart/alternative;
 boundary="------------E9KYv0kVZ9JCNt1VqgESYsQ8"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------E9KYv0kVZ9JCNt1VqgESYsQ8
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit

Thanks very much, TJ! My goodness, I made so many mistakes! I don't know 
what I was even thinking when I was working on this.

>> 2. Modified proftpd.conf
>>
>> DefaultRoot /srv/ftp
>> RequireValidShell off
>> AuthUserFile /etc/proftpd/ftpd.passwd
>> AuthGroupFile /etc/proftpd/ftpd.group<https://ftpd.group>
>> AuthOrder mod_auth_file.c

Corrected the config file to this:

DefaultRoot /srv/ftp
RequireValidShell off
AuthPAM off
AuthUserFile /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group

> Here, you are creating an AuthUserFile, using the `ftpassswd` utility, located at '/etc/proftpd/conf.d/ftpd.passwd'.  However, above you have configured AuthUserFile to point to '/etc/proftpd/ftpd.passwd', which is a different path.  Which is correct?

Good catch! I found duplicates. Now I have deleted the ftpd.passwd and 
ftpd.group files inside /etc/proftpd. I will only be using the 
ftpd.passwd and ftpd.group inside /etc/proftpd/conf.d

> Could you provide the contents of your '/usr/lib/systemd/system/proftpd.service' file?  I ask because sometimes the systemd unit file provided by a distribution may point to a different ProFTPD config file than the one edited, and/or provide other unexpected options.

My file looks like this:

root@ftp-ub-1:~# cat /usr/lib/systemd/system/proftpd.service
[Unit]
Description=ProFTPD FTP Server
Documentation=man:proftpd(8)
Wants=network-online.target
After=network-online.target nss-lookup.target local-fs.target 
remote-fs.target

[Service]
Type=forking
Environment=OPTIONS= CONFIG_FILE=/etc/proftpd/proftpd.conf
EnvironmentFile=-/etc/default/proftpd
ExecStartPre=/usr/sbin/proftpd --configtest -c $CONFIG_FILE $OPTIONS
ExecStart=/usr/sbin/proftpd -c $CONFIG_FILE $OPTIONS
ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/run/proftpd.pid

[Install]
WantedBy=multi-user.target

>
> Using an Ubuntu 24.04 Docker image, it looks to be:
>
>    # cat /usr/lib/systemd/system/proftpd.service
>    [Unit]
>    Description=ProFTPD FTP Server
>    Documentation=man:proftpd(8)
>    Wants=network-online.target
>    After=network-online.target nss-lookup.target local-fs.target remote-fs.target
>
>    [Service]
>    Type=forking
>    Environment=OPTIONS= CONFIG_FILE=/etc/proftpd/proftpd.conf
>    EnvironmentFile=-/etc/default/proftpd
>    ExecStartPre=/usr/sbin/proftpd --configtest -c $CONFIG_FILE $OPTIONS
>    ExecStart=/usr/sbin/proftpd -c $CONFIG_FILE $OPTIONS
>    ExecReload=/bin/kill -HUP $MAINPID
>    PIDFile=/run/proftpd.pid
>
>    [Install]
>    WantedBy=multi-user.target

I'll try again tomorrow morning. Too tired to think tonight and I don't 
want to mess things up again.

Thanks very much again, TJ!!

--------------E9KYv0kVZ9JCNt1VqgESYsQ8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Thanks very much, TJ! My goodness, I made so many mistakes! I
      don't know what I was even thinking when I was working on this. </p>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <blockquote type="cite">
        <pre wrap="" class="moz-quote-pre">2. Modified proftpd.conf

DefaultRoot /srv/ftp
RequireValidShell off
AuthUserFile /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group <a class="moz-txt-link-rfc2396E" href="https://ftpd.group">&lt;https://ftpd.group&gt;</a>
AuthOrder mod_auth_file.c
</pre>
      </blockquote>
    </blockquote>
    <p>Corrected the config file to this:</p>
    <pre wrap="" class="moz-quote-pre">DefaultRoot /srv/ftp
RequireValidShell off
AuthPAM off
AuthUserFile /etc/proftpd/ftpd.passwd
AuthGroupFile /etc/proftpd/ftpd.group</pre>
    <p><span style="white-space: pre-wrap">
</span></p>
    <span style="white-space: pre-wrap">
</span>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre wrap="" class="moz-quote-pre">Here, you are creating an AuthUserFile, using the `ftpassswd` utility, located at '/etc/proftpd/conf.d/ftpd.passwd'.  However, above you have configured AuthUserFile to point to '/etc/proftpd/ftpd.passwd', which is a different path.  Which is correct?
</pre>
    </blockquote>
    <p>Good catch! I found duplicates. Now I have deleted the
      ftpd.passwd and ftpd.group files inside /etc/proftpd. I will only
      be using the ftpd.passwd and ftpd.group inside /etc/proftpd/conf.d</p>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre wrap="" class="moz-quote-pre">Could you provide the contents of your '/usr/lib/systemd/system/proftpd.service' file?  I ask because sometimes the systemd unit file provided by a distribution may point to a different ProFTPD config file than the one edited, and/or provide other unexpected options.</pre>
    </blockquote>
    <p>My file looks like this:</p>
    <p>root@ftp-ub-1:~# cat /usr/lib/systemd/system/proftpd.service<br>
      [Unit]<br>
      Description=ProFTPD FTP Server<br>
      Documentation=man:proftpd(8)<br>
      Wants=network-online.target<br>
      After=network-online.target nss-lookup.target local-fs.target
      remote-fs.target<br>
      <br>
      [Service]<br>
      Type=forking<br>
      Environment=OPTIONS= CONFIG_FILE=/etc/proftpd/proftpd.conf<br>
      EnvironmentFile=-/etc/default/proftpd<br>
      ExecStartPre=/usr/sbin/proftpd --configtest -c $CONFIG_FILE
      $OPTIONS<br>
      ExecStart=/usr/sbin/proftpd -c $CONFIG_FILE $OPTIONS<br>
      ExecReload=/bin/kill -HUP $MAINPID<br>
      PIDFile=/run/proftpd.pid<br>
      <br>
      [Install]<br>
      WantedBy=multi-user.target<br>
      <br>
    </p>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <pre wrap="" class="moz-quote-pre">

Using an Ubuntu 24.04 Docker image, it looks to be:

  # cat /usr/lib/systemd/system/proftpd.service 
  [Unit]
  Description=ProFTPD FTP Server
  Documentation=man:proftpd(8)
  Wants=network-online.target
  After=network-online.target nss-lookup.target local-fs.target remote-fs.target

  [Service]
  Type=forking
  Environment=OPTIONS= CONFIG_FILE=/etc/proftpd/proftpd.conf
  EnvironmentFile=-/etc/default/proftpd
  ExecStartPre=/usr/sbin/proftpd --configtest -c $CONFIG_FILE $OPTIONS
  ExecStart=/usr/sbin/proftpd -c $CONFIG_FILE $OPTIONS
  ExecReload=/bin/kill -HUP $MAINPID
  PIDFile=/run/proftpd.pid

  [Install]
  WantedBy=multi-user.target</pre>
    </blockquote>
    <p>I'll try again tomorrow morning. Too tired to think tonight and I
      don't want to mess things up again.</p>
    <p>Thanks very much again, TJ!!</p>
  </body>
</html>

--------------E9KYv0kVZ9JCNt1VqgESYsQ8--


--===============4707079716318985418==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============4707079716318985418==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
--===============4707079716318985418==--