Open tomcrus001 opened 4 years ago
Note for the file /usr/local/bin/postlogin.sh
: this was already mentioned some time ago: postlogin.sh script is public read and should not be
Also note about this script file's usage of mysql
-command: Annoing warning in error log with mysql DB
Note also, that most probably it doesn't suffice to just remove all those world-readable permission as this will lead to some service stop working due to miss configuration
@tomcrus001 I think we can modify permissions of most files and remove the read flag for group and other categories. The settings.py file is a special case since management commands are not always run by the root user. I guess we can remove the read flag for others but leave it for group but it requires to check if every involved user is in the modoboa group.
Impacted versions
Steps to reproduce
normal Installation using modoboa-install's
run.py
Full trace using --debug option or current behaviour
Expected behavior
following files containing database-credentials mustn't be world-readable
/etc/postfix/sql*.cf
/etc/dovecot/dovecot-sql-master.conf.ext
/usr/local/bin/postlogin.sh
/etc/opendkim.conf
/srv/modoboa/instance/instance/settings.py
After having done a fresh installation using modoboa-install: