Open JoshuaBehrens opened 1 year ago
Still pondering about this. I'm not happy to "allow" 777, because that's quite a dangerous mode from a security perspective. Best would be 700 but that's of course a bit too strict for most use cases.
I'll think about it some more :)
I guess we'll have to remove the enforcing from the library - which probably is a good idea either way ;) - and add an option to phive to allow insecure directory permissions.
I can do that :) thank you for your thoughts
I have an issue using phive on bitbucket pipelines. On there chmod operation is forbidden. I already have the tools (target name is bin) directory for non-phive tools but the ensure method tries to ensure the access of the directory. It is 0777 and phive tries to force 0755.
https://github.com/phar-io/filesystem/blob/master/src/Directory.php#L75-L77
To change phive I would need to either separate chmod from mkdir and this is not in phive itself, or I need to add a check before chmod whether operation will fail (and I am not sure yet how to check lsattr does not show immutable flag) to skip it if it will fail for permission reasons.
Any ideas how to approach this? I am keen to make pull requests for this but I am not sure what is a good way