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

files.createTempFile creates files with restrictive permissions #379

Closed
grob opened this issue Sep 21, 2017 · 4 comments
Closed

files.createTempFile creates files with restrictive permissions #379

grob opened this issue Sep 21, 2017 · 4 comments
Milestone

Comments

@grob
Copy link
Member

grob commented Sep 21, 2017

files.createTempFile doesn't allow to define the permissions of the created file (although the utilized java.nio.file.Files method does), and as a result on linux/ubuntu the created files are read/writable only for the file owner. From the java docs:

When no file attributes are specified, then the resulting file may have more restrictive access permissions to files created by the File.createTempFile(String,String,File) method.

files.createTempFile should imho use a more relaxed default permission (i.e. "rw-r--r--") and/or allow passing the permissions

@botic botic added this to the 1.2 milestone Sep 21, 2017
@botic
Copy link
Member

botic commented Sep 21, 2017

Scheduled for 1.2, merci!

@kmfdm1
Copy link
Contributor

kmfdm1 commented Sep 24, 2017

Please don't use more relaxed defaults. You never know what may be stored in those files and i think the aproach of java, that those files have more restricted permissions set, is based on the asumption that there may be stored sensitive data. We should also follow this philosophy of being on the save-side and only implement the possibility to suply the permissions to be used.

@botic botic closed this as completed in c920133 Oct 27, 2017
@botic
Copy link
Member

botic commented Oct 27, 2017

You can provide additional permissions starting with the 1.2 release.

@grob
Copy link
Member Author

grob commented Oct 27, 2017

great, thanks for fixing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants