Files.createFile() does not ignore umask on Unix systems, is this expected?

Francis Galiegue fgaliegue at gmail.com
Sat Dec 20 10:17:29 UTC 2014


On Sat, Dec 20, 2014 at 10:55 AM, Francis Galiegue <fgaliegue at gmail.com> wrote:
[...]
>
> Which means that despite my specifying a 666 mode for creation, the
> umask did apply. I'd have expected it not to...
>
> The documentation does not say anything about this particular
> scenario, but it this the intended behaviour?
>

Well it appears that it is; this is the intended behaviour if open(2)
specifies O_CREAT according to its manpage, so nothing surprising, I
guess.

-- 
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/parboiled1/grappa (redde
Caesaris: https://github.com/sirthias)


More information about the nio-dev mailing list