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 #2 Change umask so all generated files are only readable by owner #5

Closed
wants to merge 1 commit into from

Conversation

bgupta
Copy link
Contributor

@bgupta bgupta commented Jul 18, 2017

This will change the perms for all files, including cookie and backups themselves.

@bgupta
Copy link
Contributor Author

bgupta commented Jul 21, 2017

@dzschille @mattock Is this ok? I went beyond the scope of the initial concern about the cookie file having the wrong perms.. and changed the umask so that everything the script writes should be 0600. (umask 0077)

@dzschille
Copy link
Collaborator

@bgupta why you want to set the permissions in the script? Normaly you define the umask for a user in /etc/profile or ~/.bashrc. All scripts executed by the user should set the file perms accordingly. Or did i miss the point of the PR here?

@bgupta
Copy link
Contributor Author

bgupta commented Jul 21, 2017

@dzschillle See #2 (The umask only scopes the commands in the script, and I thought it cleaner than running a chmod after the file(s) are created.)

@mattock
Copy link
Owner

mattock commented Jul 22, 2017

I think setting umask makes sense if there would otherwise be several chmod invocations.

@dzschille
Copy link
Collaborator

It is also possible to define the umask in the crontab:

10 4 * * * umask 077 ; /path/to/script

@bgupta
Copy link
Contributor Author

bgupta commented Jul 23, 2017 via email

@dzschille
Copy link
Collaborator

I don't see an advantage with this change, so i would reject the PR. @mattock are you okay with that decision?

@bgupta
Copy link
Contributor Author

bgupta commented Jul 23, 2017

@mattock If you do reject you should probably close #2

@mattock
Copy link
Owner

mattock commented Jul 25, 2017

@dzschille in a script using chmod is more typical than changing the defaults (umask). So I'm fine with rejecting this PR to reduce the surprise factor. That said, I think #2 can and should be fixed.

@mattock mattock closed this Jul 25, 2017
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.

3 participants