Why does open() create my file with the wrong permissions?
https://stackoverflow.com:443/questions/2245193/why-does-open-create-my-file-with-the-wrong-permissions
WEBFeb 11, 2010 · open(filename, O_RDWR|O_CREAT, 0666) 0666 is an octal number, i.e. every one of the 6's corresponds to three permission bits. 6 = rw. 7 = rwx . first three bits for owner permission, next three bits for group permission and next is for the world the first digit - represents that is file or directory. (0 - file, d - directory) here we used 0 ...
DA: 66 PA: 62 MOZ Rank: 43