Bug#796233: proftpd-basic: Aborting ftpasswd leaves passwd with world-readable permissions

Fabian Schlager fabian.schlager at icg.tugraz.at
Thu Aug 20 13:25:45 UTC 2015


Package: proftpd-basic
Version: 1.3.5-1.1+deb8u1
Severity: normal

Dear Maintainer,

When running ftpasswd (see [0] for the exact call), the script will
change the permissions of the passwd file to 0644 before prompting for a
password. Aborting it at the password prompt will cause the permissions
to _NOT_ be changed back to 0440. This stops proftpd from accepting
connections with the following error message:

  mod_auth_file/1.0: unable to use world-readable AuthUserFile
  '/etc/proftpd/passwd' (perms 0644): Operation not permitted

Changing permissions back to 0440 manually makes proftpd happy again.

I expect ftpasswd to set permissions back to be according to proftpd's
requirements, even when aborted.
  
[0] ftpasswd --passwd --name=$USER --uid=$FTP_UID --gid=65534
  --home=$FTP_ROOT/$USER --shell=/bin/false --file=$PASSWD_FILE

Regards,
Fabian

-- System Information:
Debian Release: 8.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages proftpd-basic depends on:
ii  adduser            3.113+nmu3
ii  debconf            1.5.56
ii  debianutils        4.4+b1
ii  libacl1            2.2.52-2
ii  libc6              2.19-18
ii  libcap2            1:2.24-8
ii  libmemcached11     1.0.18-4
ii  libmemcachedutil2  1.0.18-4
ii  libncurses5        5.9+20140913-1+b1
ii  libpam-runtime     1.1.8-3.1
ii  libpam0g           1.1.8-3.1
ii  libpcre3           2:8.35-3.3
ii  libssl1.0.0        1.0.1k-3+deb8u1
ii  libtinfo5          5.9+20140913-1+b1
ii  libwrap0           7.6.q-25
ii  netbase            5.3
ii  sed                4.2.2-4+b1
ii  ucf                3.0030
ii  zlib1g             1:1.2.8.dfsg-2+b1

proftpd-basic recommends no packages.

Versions of packages proftpd-basic suggests:
ii  openssl                    1.0.1k-3+deb8u1
pn  proftpd-doc                <none>
pn  proftpd-mod-geoip          <none>
pn  proftpd-mod-ldap           <none>
pn  proftpd-mod-mysql          <none>
pn  proftpd-mod-odbc           <none>
pn  proftpd-mod-pgsql          <none>
pn  proftpd-mod-sqlite         <none>
ii  xinetd [inet-superserver]  1:2.3.15-3

-- Configuration Files:
/etc/proftpd/dhparams.pem changed [not included]

-- debconf information excluded



More information about the Pkg-proftpd-maintainers mailing list