Hallo, Am Wed, 17 Mar 2004, Mike Unke schrieb:
Mit der Standard-umask 022 bekommen Dateien die Berechtigung rw_ r__ r__. Dies ergibt sich aus der Subtratkion der Berechtigungen 666 - 022 = 644.
Subtraktion ist falsch. ==== man 2 umask ==== Specifically, permissions in the umask are turned off from the mode argument to open(2) (so, for example, the common umask default value of 022 results in new files being created with permissions 0666 & ~022 = 0644 = rw-r--r-- in the usual case where the mode is specified as 0666). ==== Es wird also ein _binares UND_ auf das binaere Komplement der umask angewendet. 666 & ~022 == 666 & 755 == 644 =~ rw-r--r-- 777 & ~022 == 777 & 755 == 755 =~ rwxr-xr-x 666 & ~027 == 666 & 750 == 640 =~ rw-r----- 777 & ~027 == 777 & 750 == 750 =~ rwxr-x--- 666 & ~127 == 666 & 650 == 640 =~ rw-r----- 777 & ~127 == 777 & 650 == 650 =~ rw-r-x--- Bernd Brodesser hat das hier mal *viel* besser erklaert, sucht mal im Archiv nach "+Brodesser +umask +Komplement". -dnh -- If you haven't got time to RTFM, you haven't got time to whine on this mailing list.