Question: Why does mod_auth_file refuse
to use an AuthUserFile (or AuthGroupFile) that is
world-readable/writable? I see messages like the following logged:
mod_auth_file/1.0: unable to use world-readable AuthUserFile '/etc/proftpd/ftpd.passwd'
or:
mod_auth_file/1.0: unable to use world-writable AuthUserFile '/etc/proftpd/ftpd.passwd'
Answer: If an AuthUserFile or
AuthGroupFile is world-writable, then any user on the system
can edit that file. They can create new users, or change the entries
for existing users such that those users have different privileges, perhaps
even root privileges. In short, having AuthUserFile or
AuthGroupFile with world-writable permissions is an unsafe
configuration, and now mod_auth_file prevents this.
If the AuthUserFile is world-readable, then any user on the
system can read that file, including the hashed password. This can allow
for offline dictionary/cracking attempts against those hashes. This is also an
unsafe configuration, and thus mod_auth_file does not allow
world-readable AuthUserFiles.
Similarly, mod_auth_file will refuse to use an
AuthUserFile or AuthGroupFile if that file lives
in a directory, and that directory has world-writable permissions (even if
the configured file itself is not world-writable). A world-writable
directory would allow any system user to delete the AuthUserFile, and add their own, or to add a symlink, etc. It is another
unsafe configuration against which mod_auth_file now guards.
© Copyright 2002-2017 The ProFTPD Project
All Rights Reserved