home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / vms / 19171 < prev    next >
Encoding:
Internet Message Format  |  1992-12-12  |  1.4 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!ucbvax!lrw.com!leichter
  2. From: leichter@lrw.com (Jerry Leichter)
  3. Newsgroups: comp.os.vms
  4. Subject: re: creating a directory with delete privledge...how?
  5. Message-ID: <9212121308.AA25962@uu3.psi.com>
  6. Date: 12 Dec 92 12:05:26 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Distribution: world
  9. Organization: The Internet
  10. Lines: 25
  11.  
  12.  
  13.     How can I create a directory from within a C prg., and have that
  14.     directory be deletable. According to 'mkdir' docs, a mode of 0 means
  15.     use default protection.  But when I do a 'dir/full' on the newly
  16.     created directory, it does NOT have my default protection (as in show
  17.     protection).  'umask' does not seem to work, either.
  18.  
  19. What version of VMS are you running?  I never saw a mkdir in the standard
  20. libraries, though I suppose it had to be added for POSIX.  If so, then perhaps
  21. if you were running in the POSIX environment it might act as you expect; but
  22. in a VMS environment, umask and mkdir control what protection the RTL asks
  23. for, but it doesn't override VMS defaults - and VMS by default always removes
  24. DELETE access from the protection mask of any directory it creates.
  25.  
  26.                                  What is the
  27.     preferred method?
  28.  
  29. The only way to do this is to create the directory, then change its protection
  30. to give yourself delete access.
  31.  
  32. If mkdir is really documented as doing this in the VMS documentation, and it
  33. isn't, you've found a bug which you should report.
  34.  
  35.                             -- Jerry
  36.  
  37.