|
|
1.1 ! root 1: ! 2: ! 3: chmod Command chmod ! 4: ! 5: ! 6: ! 7: ! 8: Change the modes of a file ! 9: ! 10: cchhmmoodd +_m_o_d_e_s _f_i_l_e ! 11: cchhmmoodd -_m_o_d_e_s _f_i_l_e ! 12: ! 13: The COHERENT system assigns a mode to every file, to govern how ! 14: users access the file. The mode grants or denies permission to ! 15: read, write, or execute a file. ! 16: ! 17: The mode grants permission separately to the owner of a file, to ! 18: users from the owner's group, and to all other users. For a ! 19: directory, execute permission grants or denies the right to ! 20: search the directory, whereas write permission grants or denies ! 21: the right to create and remove files. ! 22: ! 23: In addition, the mode contains three bits that perform special ! 24: tasks: the set-user-id bit, the set-group-id bit, and the save- ! 25: text or ``sticky'' bit. See the Lexicon entry for the COHERENT ! 26: system call chmod for more information on how to use these bits. ! 27: ! 28: The command chmod changes the permissions of each specified file ! 29: according to the given mode argument. mode may be either an ! 30: octal number or a symbolic mode. Only the owner of a file or the ! 31: superuser may change a file's mode. Only the superuser may set ! 32: the sticky bit. ! 33: ! 34: A symbolic mode may have the following form. No spaces should ! 35: separate the fields in the actual mode specification. ! 36: ! 37: ! 38: [_w_h_i_c_h] _h_o_w _p_e_r_m ... [, ...] ! 39: ! 40: ! 41: which specifies the permissions that are affected by the command. ! 42: It may consist of one or more of the following: ! 43: ! 44: ! 45: aa All permissions, equivalent to ggoouu ! 46: gg Group permissions ! 47: oo Other permissions ! 48: uu User permissions ! 49: ! 50: ! 51: If no which is given, a is assumed and chmod uses the file crea- ! 52: tion mask, as described in umask. ! 53: ! 54: how specifies how the permissions will be changed. It can be ! 55: ! 56: ! 57: = Set permissions ! 58: + Add permissions ! 59: - Take away permissions ! 60: ! 61: ! 62: ! 63: ! 64: COHERENT Lexicon Page 1 ! 65: ! 66: ! 67: ! 68: ! 69: chmod Command chmod ! 70: ! 71: ! 72: ! 73: ! 74: perm specifies which permissions are changed. It may consist of ! 75: one or more of the following: ! 76: ! 77: ! 78: gg Current group permissions ! 79: oo Current other permissions ! 80: rr Read permission ! 81: ss Setuid upon execution ! 82: tt Save text (sticky bit) ! 83: uu Current user permissions ! 84: ww Write permission ! 85: xx Execute permission ! 86: ! 87: ! 88: Multiple _h_o_w/_p_e_r_m pairs have the same which applied to them. One ! 89: or more specifications separated by commas tell chmod to apply ! 90: each specification to the file successively. ! 91: ! 92: The octal modes (see stat) are as follows: ! 93: ! 94: ! 95: 0044000000 Set user id upon execution ! 96: 0022000000 Set group id upon execution ! 97: 0011000000 Sticky bit (save text) ! 98: 0000440000 Owner read permission ! 99: 0000220000 Owner write permission ! 100: 0000110000 Owner execute permission ! 101: 0000004400 Group read permission ! 102: 0000002200 Group write permission ! 103: 0000001100 Group execute permission ! 104: 0000000044 Others read permission ! 105: 0000000022 Others write permission ! 106: 0000000011 Others execute permission ! 107: ! 108: ! 109: An octal mode argument to chmod is obtained by oring the desired ! 110: mode bits together. ! 111: ! 112: ***** Examples ***** ! 113: ! 114: The first example below sets the owner's permissions to read + ! 115: write + execute, and the group and other permissions to read + ! 116: execute. The second example adds execute permission for ! 117: everyone. ! 118: ! 119: ! 120: chmod u=rwx,go=rx file ! 121: chmod +x file ! 122: ! 123: ! 124: ***** See Also ***** ! 125: ! 126: chgrp, chown, commands, ls, stat, umask ! 127: ! 128: ! 129: ! 130: COHERENT Lexicon Page 2 ! 131: ! 132:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.