Login
Register
Home
Wiki Knowledge Base
FreeDNS
Facebook
Linux Support
Control Web Panel
MENU
Home
Help
Search
Login
Register
Control Web Panel
»
WebPanel
»
PHP
»
Php mail havent permission to phpmail.log
« previous
next »
Print
Pages: [
1
]
Author
Topic: Php mail havent permission to phpmail.log (Read 4703 times)
0 Members and 1 Guest are viewing this topic.
dbmtr
Newbie
Posts: 14
Php mail havent permission to phpmail.log
«
on:
January 03, 2022, 07:24:37 PM »
Hi All,
have following error "mail(/usr/local/apache/logs/phpmail.log): failed to open stream: Read-only file system"
should I change the log file permissions or should it happen automatically during the php-fpm build?
Best regards.
Logged
roade
Newbie
Posts: 12
Re: Php mail havent permission to phpmail.log
«
Reply #1 on:
March 08, 2022, 12:37:08 PM »
Having the same problem since I switched to php-fpm.
How to fix this?
Logged
iraqiboy90
Full Member
Posts: 264
Re: Php mail havent permission to phpmail.log
«
Reply #2 on:
March 08, 2022, 12:38:33 PM »
Permission for this file on my system is:
-rw-rw-rw-. root root
Logged
roade
Newbie
Posts: 12
Re: Php mail havent permission to phpmail.log
«
Reply #3 on:
March 09, 2022, 08:32:17 AM »
They already are - 777. 0 0
Logged
rcschaff
Sr. Member
Posts: 820
Jack of all Trades, Master of some.
Re: Php mail havent permission to phpmail.log
«
Reply #4 on:
March 09, 2022, 09:50:27 PM »
As root, do:
touch /usr/local/apache/logs/phpmail.log
See if you get an error
Logged
Google Hangouts: rcschaff82@gmail.com
rcschaff
Sr. Member
Posts: 820
Jack of all Trades, Master of some.
Re: Php mail havent permission to phpmail.log
«
Reply #5 on:
March 10, 2022, 07:07:54 AM »
check the file /lib/systemd/system/php-fpm[version].service
Look for the line: ProtectSystem=
Make sure it is set to false.
run the command " systemctl daemon-reload ", then restart php-fpm[version]
Logged
Google Hangouts: rcschaff82@gmail.com
roade
Newbie
Posts: 12
Re: Php mail havent permission to phpmail.log
«
Reply #6 on:
March 10, 2022, 11:01:44 AM »
That second suggestion seems to be a possible solution because read-only file system cannot be worked around with Unix permissions (chmod).
But is that a safe solution? If not, what are other options?
Logged
rcschaff
Sr. Member
Posts: 820
Jack of all Trades, Master of some.
Re: Php mail havent permission to phpmail.log
«
Reply #7 on:
March 10, 2022, 12:12:29 PM »
It's either that, or change the location of the phpmail.log to /var/log/php/phpmail.log
Either option would be fine, but the second would be most secure.
Logged
Google Hangouts: rcschaff82@gmail.com
Print
Pages: [
1
]
« previous
next »
Control Web Panel
»
WebPanel
»
PHP
»
Php mail havent permission to phpmail.log