.\" -*- coding: UTF-8 -*- .\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright (c) 2006, 2008, Michael Kerrisk (mtk.manpages@gmail.com) .\" (A few fragments remain from an earlier (1992) version written in .\" 1992 by Drew Eckhardt .) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified by Michael Haardt .\" Modified Sat Jul 24 12:51:53 1993 by Rik Faith .\" Modified Tue Oct 22 22:39:04 1996 by Eric S. Raymond .\" Modified Thu May 1 06:05:54 UTC 1997 by Nicolás Lichtmaier .\" with Lars Wirzenius suggestion .\" 2006-05-13, mtk, substantial rewrite of description of 'mask' .\" 2008-01-09, mtk, a few rewrites and additions. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH UMASK 2 "9. Januar 2008" Linux Linux\-Programmierhandbuch .SH BEZEICHNUNG umask \- Dateimodus\-Erstellungsmaske setzen .SH ÜBERSICHT \fB#include \fP .br \fB#include \fP .sp \fBmode_t umask(mode_t \fP\fImask\fP\fB);\fP .SH BESCHREIBUNG \fBumask\fP() setzt die Dateimodus\-Erstellungsmaske (Umask) des aufrufenden Prozesses auf \fImask\fP & 0777 (d.h. nur die Dateiberechtigungsbits von \fImask\fP werden verwendet) und liefert den vorherigen Wert der Maske zurück. .\" e.g., mkfifo(), creat(), mknod(), sem_open(), mq_open(), shm_open() .\" but NOT the System V IPC *get() calls Die Umask wird für \fBopen\fP(2), \fBmkdir\fP(2) und andere Systemaufrufe verwendet, die Dateien erstellen, um die Rechte auf neu erstellte Dateien oder Verzeichnisse zu verändern. Insbesondere werden die Rechte in der Umask von den \fImode\fP\-Argumenten für \fBopen\fP(2) und \fBmkdir\fP(2) abgestellt. Die Konstanten, die für die Angabe von \fImask\fP verwendet werden sollen, werden in \fBstat\fP(2) beschrieben. Der typische Vorgabewert für die Prozess\-Umask ist \fIS_IWGRP\ |\ S_IWOTH\fP (oktal 022). Im normalen Fall, wenn das Argument \fImode\fP bei \fBopen\fP(2) als .nf S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH .fi (oktal 0666) bei der Erstellung einer neuen Datei angegeben wurde, werden die Rechte für die entstehendene Datei .nf S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH .fi sein (da 0666 & ~022 = 0644; d.h., rw\-r\-\-r\-\-). .SH RÜCKGABEWERT Der Systemaufruf hat immer Erfolg und der vorherige Wert der Maske wird zurückgegeben. .SH "KONFORM ZU" SVr4, 4.3BSD, POSIX.1\-2001. .SH ANMERKUNGEN Ein Kindprozess, der mit \fBfork\fP(2) erstellt wird, erbt die Umask der Eltern. Die Umask bleibt bei \fBexecve\fP(2) unverändert. Die Umask\-Einstellung beeinflusst auch die Berechtigungen der vom Prozess erstellten POSIX\-IPC\-Objekte (\fBmq_open\fP(3), \fBsem_open\fP(3), \fBshm_open\fP(3)), FIFOs (\fBmkfifo\fP(3)) und UNIX\-Domain\-Sockets (\fBunix\fP(7)). Die Umask berührt nicht die Berechtigungen, die den vom Prozess (mittels \fBmsgget\fP(2), \fBsemget\fP(2) und \fBshmget\fP(2)) erzeugten System\-V\-IPC\-Objekten zugewiesen wurden. .SH "SIEHE AUCH" .\" FIXME . eventually: .BR acl (5) \fBchmod\fP(2), \fBmkdir\fP(2), \fBopen\fP(2), \fBstat\fP(2) .SH KOLOPHON Diese Seite ist Teil der Veröffentlichung 3.42 des Projekts Linux\-\fIman\-pages\fP. Eine Beschreibung des Projekts und Informationen, wie Fehler gemeldet werden können, finden sich unter http://www.kernel.org/doc/man\-pages/. .SH ÜBERSETZUNG Die deutsche Übersetzung dieser Handbuchseite wurde von Martin Schulze , Helge Kreutzmann und Martin Eberhard Schauer erstellt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die GNU General Public License Version 3 oder neuer bezüglich der Copyright-Bedingungen. Es wird KEINE HAFTUNG übernommen. Wenn Sie Fehler in der Übersetzung dieser Handbuchseite finden, schicken Sie bitte eine E-Mail an .