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

Wrong permissions #35

Open
dbaumgarten opened this issue Jun 6, 2017 · 1 comment
Open

Wrong permissions #35

dbaumgarten opened this issue Jun 6, 2017 · 1 comment

Comments

@dbaumgarten
Copy link

Updating (at least under linux) changes the permissions on the file.
Before the update i set ther permissions to 755.
After the update the file has 700.

With this updating a file for other users (updating a file in /usr/bin as root) makes the file unusable for any other user.

There seems to be some code to set permissions to 755 in apply.go, but it seems to be not working.

@dbaumgarten
Copy link
Author

Googling a bit I found out, that file permissions passed to os.OpenFile are modified by the umask of the process (which in my case is 077).
Interestingly os.Chmod is not affected by the umask, so calling os.Chmod (with the right permissions) right after creating the file solves this problem.

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

1 participant