No-one really understands permissions.
open(pathname = "/etc/passwd", flags = O_WRONLY) failed, Permission denied
(13, EACCES) because the process does not have write permission to the
"passwd" regular file in the pathname "/etc" directory, the process
effective GID 1000 "pmiller" does not match the regular file owner 0 "root"
so the owner permission mode "rw-" is ignored, the others permission mode
is "r--", and the process is not privileged (does not have the DAC_OVERRIDE
capability)
The modes do not “OR“ together.
|