Skip to content

Commit c213150

Browse files
committed
dietpi-software: ProFTPD: config updates
Skip IdentLookups directives. The module is disabled by default since Bullseye (was was builtin , hence no need to disable it by directive that is supported only if the module has been explicitly enabled by the admin. Furthermore, fix root user denial: Users listed in /etc/ftpusers non-intuitively are NOT allowed to use ProFTPD. We obviously thought it is the other way round, when commenting the "root" line. Skip that step and in case uncomment or re-add the line on dietpi-update. This however is not critical in terms of security, since the config contains "RootLogin off" anyway. But no reason to add the 2nd layer ASAP.
1 parent 804974f commit c213150

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.conf/dps_94/conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Include /etc/proftpd/modules.conf
88
# Set "off" to disable IPv6 support which is problematic on IPv4 only boxes.
99
UseIPv6 on
1010
# If set "on" you can experience a longer connection delay in many cases.
11-
IdentLookups off
1211
UseReverseDNS off
1312

1413
ServerName "DietPi FTP"

.update/patches

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2642,6 +2642,13 @@ Patch_9_19()
26422642
# Software updates, migrations and patches
26432643
if [[ -f '/boot/dietpi/.installed' ]]
26442644
then
2645+
# ProFTPD
2646+
if [[ -f '/etc/ftpusers' ]] && grep -q '^[[:blank:]]*aSOFTWARE_INSTALL_STATE\[94\]=2' /boot/dietpi/.installed
2647+
then
2648+
G_DIETPI-NOTIFY 2 'Do not allow root user to use ProFTPD'
2649+
G_CONFIG_INJECT 'root' 'root' /etc/ftpusers
2650+
fi
2651+
26452652
# Pi-hole v6 migration
26462653
# - /etc/pihole/pihole.toml indicates that Pi-hole has been upgraded to v6 already.
26472654
# - The /var/www/pihole symlink indicates that an instance installed via dietpi-software has not been migrated yet.

dietpi/dietpi-software

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3663,12 +3663,6 @@ _EOF_
36633663
# Config
36643664
G_BACKUP_FP /etc/proftpd/proftpd.conf
36653665
dps_index=$software_id Download_Install 'conf' /etc/proftpd/proftpd.conf
3666-
3667-
# Do not allow root access via FTP
3668-
G_EXEC sed --follow-symlinks -i 's/^[[:blank:]]*root/#root/' /etc/ftpusers
3669-
3670-
# Fix ident lookup: https://github.com/MichaIng/DietPi/issues/4666
3671-
G_EXEC sed --follow-symlinks -i '/IdentLookups/c\<IfModule mod_ident.c>\nIdentLookups off\n</IfModule>' /etc/proftpd/proftpd.conf
36723666
fi
36733667

36743668
if To_Install 96 nmbd smbd # Samba Server

0 commit comments

Comments
 (0)