Failed to open stream: Permission denied
-
Hello
My issue looks the same as https://forum.cloudron.io/topic/13321/failed-to-open-stream-permission-denied-for-cache-data/7 but I don't think a solution as been provided

Jan 10 17:23:32 => Run cron tasks Jan 10 17:23:32 In Filesystem.php line 122: Jan 10 17:23:32 2026-01-10T16:23:32Z Jan 10 17:23:32 file_put_contents(/app/code/storage/framework/cache/data/71/e7/71e745d13645 Jan 10 17:23:32 beba997b5011324db8ee58db0e30): Failed to open stream: Permission deniedI'm running Freescout 1.8.201 and emails are not automatically fetched. I've to click on Manage > Tools Fetch Emails to get them.
On Manage > Status I can read:
Non-writable files found/app/code/storage/framework/cache/data/71/e7/71e745d13645beba997b5011324db8ee58db0e30
Run the following command (read more):
sudo chown -R www-data:www-data /app/code
on storage/framework/cache/data/
I've tried sudo chown -R www-data:www-data /app/code but it anwsers "Read only file system"
I've also tried sudo chmod 775 -R /app/code/ with same results.Do you have any idea what I can test ?
Generate Diagnostics Data
-
S sebastienserre referenced this topic
-
Rebooting mail service and then Freescout app is solving the issue.
I will monitor to see if it's definitively fixed. -
The error just came back....
-
So
/app/codeis read-only in Cloudron, however/app/code/storageis linked into/app/data/, which is read-write. So the correct chown would be against/app/data/storage/in this case. The startup code of the app does this already, which is why it works after a restart.Then the question remains, who changes permissions on that cache folder. Do you have some custom cron job or so which may run as root maybe? Which plugins have you installed, which could interfere here?
-
Hello @nebulon
I've a cron here:

Here the list of Freescout module:

In the Workflows, I only have rule like "if email is XXXX then apply tag XXXX"
-
Ah I see, that custom cron is most likely the root case then, since it runs the scheduler as root instead of www-data. Either way the package already comes with this cron job: https://git.cloudron.io/packages/freescout-app/-/blob/master/cron.sh?ref_type=heads
So you should be fine with just removing your custom cron setting there, if I read that correctly, and that hopefully solves the issue.