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