The issue
When I try to post a new discussion, or reply:
The stream or file "/www/wwwroot/mysite.com/storage/logs/flarum-2023-08-14.log
When I changed the file's permission to 775, the problem is solved,
But the next day, flarum-2023-08-15 will still be 644, and then the problem appear again.
full error text
<br />
<b>Fatal error</b>: Uncaught UnexpectedValueException: The stream or file "/www/wwwroot/mysite.com/storage/logs/flarum-2023-08-14.log" could not be opened in append mode: Failed to open stream: Permission denied in /www/wwwroot/mysite.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:115
Stack trace:
#0 /www/wwwroot/mysite.com/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(120): Monolog\Handler\StreamHandler->write()
#1 /www/wwwroot/mysite.com/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(39): Monolog\Handler\RotatingFileHandler->write()
#2 /www/wwwroot/mysite.com/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle()
#3 /www/wwwroot/mysite.com/vendor/monolog/monolog/src/Monolog/Logger.php(712): Monolog\Logger->addRecord()
#4 /www/wwwroot/mysite.com/vendor/flarum/core/src/Foundation/ErrorHandling/LogReporter.php(32): Monolog\Logger->error()
#5 /www/wwwroot/mysite.com/vendor/flarum/core/src/Http/Middleware/HandleErrors.php(63): Flarum\Foundation\ErrorHandling\LogReporter->report()
#6 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\HandleErrors->process()
#7 /www/wwwroot/mysite.com/vendor/flarum/core/src/Http/Middleware/InjectActorReference.php(25): Laminas\Stratigility\Next->handle()
#8 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\InjectActorReference->process()
#9 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#10 /www/wwwroot/mysite.com/vendor/middlewares/request-handler/src/RequestHandler.php(84): Laminas\Stratigility\MiddlewarePipe->process()
#11 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\RequestHandler->process()
#12 /www/wwwroot/mysite.com/vendor/middlewares/base-path-router/src/BasePathRouter.php(101): Laminas\Stratigility\Next->handle()
#13 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePathRouter->process()
#14 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Middleware/OriginalMessages.php(36): Laminas\Stratigility\Next->handle()
#15 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Laminas\Stratigility\Middleware\OriginalMessages->process()
#16 /www/wwwroot/mysite.com/vendor/middlewares/base-path/src/BasePath.php(73): Laminas\Stratigility\Next->handle()
#17 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Middlewares\BasePath->process()
#18 /www/wwwroot/mysite.com/vendor/flarum/core/src/Http/Middleware/ProcessIp.php(24): Laminas\Stratigility\Next->handle()
#19 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/Next.php(49): Flarum\Http\Middleware\ProcessIp->process()
#20 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(75): Laminas\Stratigility\Next->handle()
#21 /www/wwwroot/mysite.com/vendor/laminas/laminas-stratigility/src/MiddlewarePipe.php(64): Laminas\Stratigility\MiddlewarePipe->process()
#22 /www/wwwroot/mysite.com/vendor/laminas/laminas-httphandlerrunner/src/RequestHandlerRunner.php(73): Laminas\Stratigility\MiddlewarePipe->handle()
#23 /www/wwwroot/mysite.com/vendor/flarum/core/src/Http/Server.php(45): Laminas\HttpHandlerRunner\RequestHandlerRunner->run()
#24 /www/wwwroot/mysite.com/public/index.php(26): Flarum\Http\Server->listen()
#25 {main}
thrown in <b>/www/wwwroot/mysite.com/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php</b> on line <b>115</b><br />
Flarum information
Flarum core: 1.8.1
PHP version: 8.0.26
MySQL version: 8.0.24
Loaded extensions: Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, ctype, curl, dom, filter, ftp, gd, gettext, hash, iconv, intl, json, mbstring, SPL, session, pcntl, standard, PDO, mysqlnd, pdo_sqlite, Phar, posix, Reflection, pdo_mysql, shmop, SimpleXML, soap, sockets, sodium, mysqli, sysvsem, tokenizer, xml, xmlreader, xmlwriter, zip, fileinfo, exif
+------------------------------------+----------+--------+
| Flarum Extensions | | |
+------------------------------------+----------+--------+
| ID | Version | Commit |
+------------------------------------+----------+--------+
| flarum-flags | v1.8.0 | |
| flarum-suspend | v1.8.0 | |
| fof-oauth | 1.4.4 | |
| flarum-approval | v1.8.0 | |
| flarum-tags | v1.8.0 | |
| flarum-likes | v1.8.0 | |
| flarum-markdown | v1.8.0 | |
| afrux-forum-widgets-core | v0.1.7 | |
| zerosonesfun-direct-links | 2.2 | |
| v17development-seo | v1.8.0 | |
| the-turk-mathren | 1.0.7 | |
| sycho-profile-cover | v1.3.5 | |
| ramesh-dada-bbcode-alerts | 6.21 | |
| nearata-minecraft-avatars | v2.1.1 | |
| nearata-cakeday | v2.2.0 | |
| michaelbelgium-discussion-views | v7.2.1 | |
| katosdev-signature | 1.2 | |
| fof-user-directory | 1.2.3 | |
| fof-user-bio | 1.2.0 | |
| fof-upload | 1.3.2 | |
| fof-terms | 1.2.1 | |
| fof-sitemap | 1.0.3 | |
| fof-recaptcha | 1.2.1 | |
| fof-reactions | 1.2.0 | |
| fof-profile-image-crop | 1.1.5 | |
| fof-polls | 2.1.1 | |
| fof-nightmode | 1.5.2 | |
| fof-links | 1.1.4 | |
| fof-forum-statistics-widget | 1.1.0 | |
| fof-drafts | 1.2.2 | |
| fof-bbcode-details | 1.1.1 | |
| flarum-subscriptions | v1.8.0 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-pusher | v1.8.0 | |
| flarum-nicknames | v1.8.0 | |
| flarum-mentions | v1.8.2 | |
| flarum-lock | v1.8.0 | |
| flarum-lang-chinese-simplified | v1.3.0 | |
| flarum-emoji | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| clarkwinkelmann-predefined-avatars | 1.0.1 | |
| clarkwinkelmann-likes-received | 1.0.2 | |
| clarkwinkelmann-circle-groups | 1.0.1 | |
| clarkwinkelmann-bookmarks | 1.1.0 | |
| clarkwinkelmann-author-change | 1.0.3 | |
| askvortsov-pwa | v3.3.3 | |
| askvortsov-moderator-warnings | v0.6.1 | |
| askvortsov-markdown-tables | v1.2.1 | |
| askvortsov-checklist | v1.3.1 | |
| afrux-top-posters-widget | v0.1.4 | |
| afrux-online-users-widget | v0.1.6 | |
| afrux-news-widget | v0.1.1 | |
| afrux-forum-stats-widget | dev-main | |
| acpl-mobile-tab | 1.1.1 | |
+------------------------------------+----------+--------+
Base URL: https://swjtu.in
Installation path: /www/wwwroot/mcfuntime.com
Queue driver: sync
Session driver: file
Scheduler status: Never run
Mail driver: smtp
Debug mode: ON