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.

chmod<br />

Examples<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 />

t This represents the sticky bit. For a file, the sticky bit causes a search for<br />

the program in the user’s STEPLIB, the link pack area, or link list<br />

concatenation. For a directory, the sticky bit allows files in a directory or<br />

subdirectories to be deleted or renamed only by the owner of the file, by the<br />

owner of the directory, or by a superuser.<br />

You can specify multiple symbolic names if you separate them with commas.<br />

Absolute modes are octal numbers specifying the complete list of attributes for the<br />

files; you specify attributes by ORing together these bits.<br />

4000 Set-user-ID bit<br />

2000 Set-group-ID bit<br />

1000 Sticky bit<br />

0400 User read<br />

0200 User write<br />

0100 User execute (or list directory)<br />

0040 Group read<br />

0020 Group write<br />

0010 Group execute<br />

0004 Other read<br />

0002 Other write<br />

0001 Other execute<br />

1. To remove write permission from orgcht:<br />

chmod –w orgcht<br />

2. To turn on read, write, and execute permissions, and turn off the set-user-ID bit,<br />

set-group-ID bit, and sticky bit attributes. This is equivalent to chmod 0777<br />

aprsal:<br />

chmod a=rwx aprsal<br />

3. To set all permission bits on (anyone can read/write/execute):<br />

chmod 777 scratch<br />

4. To set user (owner) executable permission bit on:<br />

chmod u+x file<br />

5. To set group read / write permission bits:<br />

chmod g+rw file<br />

6. To set other write permission off on 2 files:<br />

chmod o-w file1 file2<br />

7. To set group read/write/execute permissions on the directory /public/teamdir<br />

and all its files and subdirectories:<br />

chmod -R g+rwx /public/teamdir<br />

8. To set group read/execute on, group write off on /u/ateam/pgm:<br />

chmod g=rx /u/ateam/pgm<br />

126 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!