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

file permissions follow system umask even if explicitly set #2840

Closed
vitoyucepi opened this issue Jan 10, 2023 · 1 comment
Closed

file permissions follow system umask even if explicitly set #2840

vitoyucepi opened this issue Jan 10, 2023 · 1 comment

Comments

@vitoyucepi
Copy link
Collaborator

Describe the bug
All file functions follow umask even if explicitly set permissions in function calls.

To Reproduce

file.mkdir(perms=0o777, '/tmp/1')
file.write(data='test', perms=0o777, '/tmp/2')
output.file(perm=0o777, %opus, '/tmp/3', blank())

Expected behavior
If the perm-like parameter is explicitly set, then umask should be overridden.
Add the umask set function.

Version details

  • OS: ubuntu:22.04 in docker
  • Version: 2.1.3

Install method
Deb package from liquidsoap releases at github

Common issues
N/A

@toots toots closed this as completed in 6557ff5 Feb 23, 2023
toots added a commit that referenced this issue Feb 23, 2023
@toots
Copy link
Member

toots commented Feb 23, 2023

Thanks for reporting. I added umask getter/setter, following the settings convention:

# Get current umask:
umask()

# Set current umask:
umask.set(...)

# Equivalent to in `main`/2.2:
umask := ...

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

No branches or pull requests

2 participants