-
Notifications
You must be signed in to change notification settings - Fork 419
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
Bug: Provide better checks and error reporting if Photo dirs are not writeable #6891
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
There is a warning shown in CRM/src/ChurchCRM/Service/AppIntegrityService.php Lines 143 to 148 in da27702
How exactly would you like it to be handled differently? |
https://github.com/ChurchCRM/CRM/blob/master/src/ChurchCRM/dto/Photo.php#L192-L197 I believe this should check for |
# Description & Issue number it closes <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. --> Resolves #6891 ## Screenshots (if appropriate) <!-- Before and after --> ![Screenshot 2024-05-28 at 18-10-56 ChurchCRM Debug](https://github.com/ChurchCRM/CRM/assets/201834/50e3b83a-7e51-40db-b8e2-7ada0ce3e737) ## How to test the changes? ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # How Has This Been Tested? <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> # Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
Description
File permissions are tricky because this code can be run in a number of different environments, as different users, in both development and production mode. Better checks are needed, followed by better error reporting when there are problems with writeable files or directories. This particular issue is to address the problems in the Photo management area, which tries to create/update photos and thumbnails.
Steps To Reproduce
The errors are seen if the src/Images/{Person,Family} and 'thumbnails' directory in each of those are not writeable. The errors generated in this case are not obvious.
Expected behavior
Ideally an unwriteable file or directory would generate a meaningful error, at least in the logs, if not on screen.
Screenshots and/or logs
📋 Relevant screenshots:
N/A
📋 Logs:
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: