- Issue created by @c-logemann
- Issue was unassigned.
- Status changed to Needs work
7 months ago 6:58pm 15 June 2024 - π©πͺGermany c-logemann Frankfurt/M, Germany
I commit a first code which makes the test "real" with
chmod($directory, 0755);
.
But depending on the webserver this can cause problems related to group and others permissions. Maybe we can read the permissions first and just change the user permission. And like good hackers we could clean up by ourself with resetting the permissions as before. - Status changed to Needs review
7 months ago 7:26pm 15 June 2024 - π©πͺGermany c-logemann Frankfurt/M, Germany
I added a file perm read and chmod reset to the code.
- Merge request !69Resolve #3454866 "File check is problematic green" β (Closed) created by c-logemann
- π©πͺGermany c-logemann Frankfurt/M, Germany
On my test system (D 10.2, nginx, fpm) I changed the file ownership to secured user and the chmod part was just ignored.
- Status changed to Needs work
7 months ago 7:32pm 15 June 2024 - πΊπΈUnited States smustgrave
So this module is lacking tests but this seems like a change we should have coverage for as this is one of the more important checks
- π©πͺGermany c-logemann Frankfurt/M, Germany
Just found my old issue about this: β¨ "Safe file system permissions" should test the ownership of files and directories Closed: outdated
- π©πͺGermany c-logemann Frankfurt/M, Germany
@smustgrave OK, we need a test which creates an unsave situation to check if the file permission tests is still working correctly? Or is it only to make sure the test will not cause problems?
On my old concept I was only thinking about checking if webserver is the owner of the code. This can also be a good test additionally to the already working search on writeable folder. But this should be handle in different issues.
- πΊπΈUnited States smustgrave
I'm taking my previous statement for tests back, sorta. π± Add better test coverage per check Active is open. Don't think I should hold a fix for something the module is missing as a whole.
-
smustgrave β
committed de85ed31 on 3.1.x
Issue #3454866 by c-logemann: file check is problematic "green" when not...
-
smustgrave β
committed de85ed31 on 3.1.x
- πΊπΈUnited States smustgrave
Think this change I'm only going to include in 3.1.x for now.
- π©πͺGermany c-logemann Frankfurt/M, Germany
@smustgrave Thanks for committing. If I find some time I plan to check for some more scenarios on the file permissions. And in any case it is still a good idea to get test coverage.
Automatically closed - issue fixed for 2 weeks with no activity.