Skip to content
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

Fix user provided file/dir permission settings #167

Conversation

andr-d
Copy link

@andr-d andr-d commented Aug 14, 2024

retain user provided file/dir permissions like 0775 or "0775" as octal int. Converting them with (int) yields incorrect values, as the value is a string at this moment and (int) "0775" will convert to 775 instead to 0775 (509 in decimal), resulting in some interesting file permissions later.

retain user provided file/dir permissions like 0775 or "0775" as octal int. Converting them with (int) yields incorrect values.
@maxhelias
Copy link
Collaborator

I don't really remember, but from what I do recall it's the yaml component that performs the octal conversion of this data: 0o755 and here we only cast octal int.
Example in the doc : https://github.com/thephpleague/flysystem-bundle/blob/3.x/docs/B-configuration-reference.md?plain=1#L48-L52

@andr-d
Copy link
Author

andr-d commented Aug 14, 2024

@maxhelias my bad, I missed the correct octal number notation in the yaml. Using that it works as expected.

@andr-d andr-d closed this Aug 14, 2024
@andr-d andr-d deleted the fix-user-provided-file/dir-permission-settings branch August 14, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants