16.12.2012 Views

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

z/OS V1R9.0 UNIX System Services Command ... - Christian Grothoff

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

mkdir<br />

Description<br />

Options<br />

Localization<br />

The mkdir command creates a new directory for each named directory argument.<br />

The mode for a directory created by mkdir is determined by taking the initial mode<br />

setting of 777 (a=rwx) or the value of –m if specified and applying the umask to it.<br />

–m mode<br />

Lets you specify permissions for the directories. The mode argument can<br />

have the same value as the mode for chmod; see chmod for more details.<br />

You can also set the sticky bit on for directories. For more information, see<br />

chmod. The umask value is applied to the mode value to determine the<br />

new directory’s actual mode setting.<br />

Note: A superuser or the file owner can use a chmod command or chmod()<br />

function to change two options for an executable file. The options<br />

are set in two file mode bits:<br />

v Set-user-ID (S_ISUID) with the setuid option<br />

v Set-group-ID (S_ISGID) with the setgid option<br />

If one or both of these bits are on, the effective UID, effective GID,<br />

or both, plus the saved UID, saved GID, or both, for the process<br />

running the program are changed to the owning UID, GID, or both,<br />

for the file. This change temporarily gives the process running the<br />

program access to data the file owner or group can access.<br />

In a new file, both bits are set off. Also, if the owning UID or GID of a<br />

file is changed or if the file is written in, the bits are turned off. In<br />

shell scripts, these bits are ignored.<br />

If the RACF profile named FILE.GROUPOWNER.SETGID exists in<br />

the <strong>UNIX</strong>PRIV class, then the set-group-ID bit for a directory<br />

determines how the group owner is initialized for new objects<br />

created within the directory:<br />

v If the set-gid bit is on, then the owning GID is set to that of the<br />

directory.<br />

v If the set-gid bit is off, then the owning GID is set to the effective<br />

GID of the process.<br />

–p Creates intermediate directory components that don’t already exist. For<br />

example, if one of the directory arguments is dir/subdir/subsub and<br />

subdir doesn’t already exist, mkdir creates it. Such intermediate directories<br />

are created with mode bits determined in the following way: Take a default<br />

mode setting of 777 (a=rwx), apply the process’s umask setting to it, and<br />

then turn on the user write and user execute permissions (u+wx). The –m<br />

mode specification on the command line is not used for computing the<br />

mode of intermediate directories.<br />

mkdir uses the following localization environment variables:<br />

v LANG<br />

v LC_ALL<br />

v LC_CTYPE<br />

v LC_MESSAGES<br />

426 z/<strong>OS</strong> <strong>V1R9.0</strong> <strong>UNIX</strong> <strong>System</strong> <strong>Services</strong> <strong>Command</strong> Reference

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!