We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var mode os.FileMode = 0666 os.OpenFile("g2", os.O_WRONLY|os.O_TRUNC|os.O_CREATE, mode)
create file with mode -rw-rw-r-- 1 admin admin 0 Apr 21 18:25 g2
not -rw-rw-rw- 1 admin admin 0 Apr 21 18:24 g2
miss w
At go version go1.4.1 linux/amd64
The text was updated successfully, but these errors were encountered:
Probably, your umask is 0022. http://man7.org/linux/man-pages/man2/open.2.html
umask
The effective permissions are modified by the process's umask in the usual way: The permissions of the created file are (mode & ~umask).
Sorry, something went wrong.
Thank you, you are right
No branches or pull requests
create file with mode
-rw-rw-r-- 1 admin admin 0 Apr 21 18:25 g2
not
-rw-rw-rw- 1 admin admin 0 Apr 21 18:24 g2
miss w
At go version go1.4.1 linux/amd64
The text was updated successfully, but these errors were encountered: