>G<
There is still some confusion about the differeence between a umask and a file permission.
the formula goes like this:
777 - umask = file permission
so the umask is not the same thing as a file permission
666 is usually a file permission meaning rw for owner, group and public. (rw-rw-rw-)
to acheive a file permisssion of 666 you would use a umask of 111
777 - 111 = 666
So for a umask of 022
777 - 022 = 755 which means rwx for owner, r-x for group, r-x for public, combined it is rwxr-xr-x
And for umask 002
777 -002 =775 which means rwx for owner, rwx for group, r-x for public, combined it is rwxrwxr-x
hope this helps.
|