[Script request]: Fix error after update Firefly-III #6104
Replies: 1 comment
-
Next time, you'll probably be 10x faster to just edit the file directly and make a PR with enough description than this long text 😄 PR created: #6119 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Application Name
Firefly-III
Website
https://github.com/firefly-iii/firefly-iii
Description
After updating Firefly-III using the script, an error occurs when accessing the resource. Right now, an error occurred during the update:
file_put_contents(/opt/firefly/storage/framework/cache/data/23/78/2378412ac880c8eb5ff62583c7d16e6bea6a90b8): Failed to open stream: No such file or directory
This error occurred in the file
/opt/firefly/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php on line 204 with code 0.
After looking into the problem a little, I came to the following conclusions and fixed the problem myself. I think it would be useful if this problem were taken into account in the future when using the update script.
Issue Report: Cache Directory Permissions Error During Firefly-III Update
Problem Description:
During the Firefly-III update process, the following error occurs when attempting to write to the cache directory:
This happens at:
Root Cause Analysis:
The error occurs due to permission issues with Laravel's cache directory structure:
cache/data/23/78/
), which aren't automatically created during updatesroot
instead ofwww-data
/storage/framework/cache
Reproduction Steps:
Solution Implemented:
The following commands resolved the issue:
Recommendation for Update Script:
To prevent this in future updates, modify the
update_script()
function inbuild.func
as follows:Why This Matters:
Validation:
Confirmed working on:
Additional Notes:
Consider adding permission checks to the installation script as well:
This solution ensures smooth updates while maintaining proper security practices.
I'm new here, so if I've done something that's not in line with the rules, please let me know. I want to help others who are having the same issues I had when updating Firefly-III.
Due Diligence
Beta Was this translation helpful? Give feedback.
All reactions