|
From: TJ S. <tj...@ca...> - 2025-08-14 21:06:22
|
> 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 The AuthGroupFile directive only takes a single path; '/etc/proftpd/ftpd.group' in this case. Any additional parameters may cause config parsing errors. > 3. Create user using ftpasswd: > ftpasswd --passwd --file=/etc/proftpd/conf.d/ftpd.passwd --name=user1 > --uid=105 --gid=65534 --shell=/bin/false 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? > 4. Start proftpd: systemctl start proftpd 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. 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 > Starting up gives me the following errors:"fatal: unknown configuration > directive" followed by the first line in the virtual users password file > (/etc/proftpd/ftpd.passwd). This error occurs twice, but the weird thing > is I am still able to login as user1. Could you provide the exact errors you see on startup, please? > Reddit's AI says that proftpd is looking for a format in > Apache format <User>....</User> In this case, Reddit's AI is incorrect. ProFTPD does not use that Apache format; see: http://www.proftpd.org/docs/howto/AuthFiles.html > The main problem though, is that after logging in successfully, I can > download files from /srv/ftp, but I cannot upload ("Permission denied"). > The directory ownership of /srv/ftp is the same as the user running > proftpd (ftp:nogroup), but I suspect that I am missing some directive in > proftpd.conf, but I have no idea. Am I missing a step perhaps? If you are able to run ProFTPD in debugging mode (which can itself be more challenging than expected, when dealing with systemd), it should log more details about why the uploads are not working as expected: http://www.proftpd.org/docs/howto/Debugging.html Cheers, TJ |