home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man2 / chmod.2 < prev    next >
Encoding:
Text File  |  1975-06-26  |  1013 b   |  46 lines

  1. .th CHMOD II 12/15/74
  2. .sh NAME
  3. chmod \*- change mode of file
  4. .sh SYNOPSIS
  5. (chmod = 15.)
  6. .br
  7. .ft B
  8. sys chmod; name; mode
  9. .s3
  10. chmod(name, mode)
  11. .br
  12. char *name;
  13. .ft R
  14. .sh DESCRIPTION
  15. The file whose name
  16. is given as the null-terminated string pointed to by
  17. .it name
  18. has its mode changed to
  19. .it mode.
  20. Modes are constructed by ORing together some
  21. combination of the following:
  22. .s3
  23. .in +3
  24.  4000 set user ID on execution
  25.  2000 set group ID on execution
  26.  1000 save text image after execution
  27.  0400 read by owner
  28.  0200 write by owner
  29.  0100 execute (search on directory) by owner
  30.  0070 read, write, execute (search) by group
  31.  0007 read, write, execute (search) by others
  32. .in -3
  33. .s3
  34. Only the owner of a file (or the super-user) may change the mode.
  35. Only the super-user can set the 1000 mode.
  36. .sh "SEE ALSO"
  37. chmod (I)
  38. .sh DIAGNOSTIC
  39. Error bit
  40. (c-bit) set if
  41. .it name
  42. cannot be found or if current user
  43. is neither the owner of the file nor the super-user.
  44. From C, a \*-1 returned value indicates an
  45. error, 0 indicates success.
  46.