Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

msmtp doesn't have permission to create a log #11

Closed
insanity54 opened this issue Jan 16, 2017 · 1 comment
Closed

msmtp doesn't have permission to create a log #11

insanity54 opened this issue Jan 16, 2017 · 1 comment

Comments

@insanity54
Copy link

I noticed that when osticket sends emails, the following error appears in /var/log/php5-fpm.log--

WARNING: [pool www] child 17 said into stderr: "msmtp: cannot log to /var/log/msmtp.log: cannot open: Permission denied"

When I investigated, I found that the logfile /var/log/msmtp.log which is configured in msmtp.conf doesn't exist--

docker exec -it osticket /bin/bash -c 'ls -la /var/log/msmtp.log'
ls: cannot access /var/log/msmtp.log: No such file or directory

So it seems that the PHP user www-data doesn't have write access for /var/log/.

I'm not sure if this is the best way to fix this, but here's my proposed solution. In the Dockerfile, add these lines--

touch /var/log/msmtp.log
chown root:www-data /var/log/msmtp.log
chmod 0664 /var/log/msmtp.log
martin-css added a commit that referenced this issue Jan 25, 2017
Fixed log file permission for msmtp log (#11).
@martin-css
Copy link
Member

Thanks for the report. The Dockerfile has been updated to allow www-data write permission to the log file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants