Fix `{user,group,other}-{read,execute}-bit' (in the docs too).
Make the launcher template copying code try to ensure that all user access bits are on.
This commit is contained in:
parent
58b60a6a87
commit
c0051518be
|
@ -1,9 +1,9 @@
|
|||
#lang scheme/unit
|
||||
#lang racket/unit
|
||||
|
||||
(require scheme/path
|
||||
scheme/file
|
||||
scheme/list
|
||||
scheme/string
|
||||
(require racket/path
|
||||
racket/file
|
||||
racket/list
|
||||
racket/string
|
||||
|
||||
compiler/embed
|
||||
setup/dirs
|
||||
|
@ -99,7 +99,13 @@
|
|||
(directory-exists? dest)
|
||||
(link-exists? dest))
|
||||
(delete-directory/files dest))
|
||||
(copy-file src dest))
|
||||
(copy-file src dest)
|
||||
;; make sure it's read/write/execute-able
|
||||
(let* ([perms1 (file-or-directory-permissions dest 'bits)]
|
||||
[perms2 (bitwise-ior user-read-bit user-write-bit user-execute-bit
|
||||
perms1)])
|
||||
(unless (equal perms1 perms2)
|
||||
(file-or-directory-permissions dest perms2))))
|
||||
|
||||
(define (script-variant? v)
|
||||
(memq v '(script-3m script-cgc)))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
write-to-file
|
||||
display-lines-to-file
|
||||
|
||||
user-read-bit
|
||||
user-read-bit
|
||||
user-write-bit
|
||||
user-execute-bit
|
||||
group-read-bit
|
||||
|
@ -599,12 +599,12 @@
|
|||
(->file 'display-lines-to-file f mode exists
|
||||
(lambda (p) (do-lines->port l p newline))))
|
||||
|
||||
(define user-read-bit #o100)
|
||||
(define user-read-bit #o400)
|
||||
(define user-write-bit #o200)
|
||||
(define user-execute-bit #o400)
|
||||
(define group-read-bit #o010)
|
||||
(define user-execute-bit #o100)
|
||||
(define group-read-bit #o040)
|
||||
(define group-write-bit #o020)
|
||||
(define group-execute-bit #o040)
|
||||
(define other-read-bit #o001)
|
||||
(define group-execute-bit #o010)
|
||||
(define other-read-bit #o004)
|
||||
(define other-write-bit #o002)
|
||||
(define other-execute-bit #o004)
|
||||
(define other-execute-bit #o001)
|
||||
|
|
|
@ -330,7 +330,7 @@ such file exists).}
|
|||
|
||||
|
||||
@defproc[(file-or-directory-identity [path path-string?]
|
||||
[as-link? any/c #f])
|
||||
[as-link? any/c #f])
|
||||
exact-positive-integer?]{
|
||||
|
||||
@index['("inode")]{Returns} a number that represents the identity of
|
||||
|
@ -1105,15 +1105,15 @@ to the file portion of the path.
|
|||
(make-lock-file-name "/home/george/project/important-file")]}
|
||||
|
||||
@deftogether[(
|
||||
@defthing[user-read-bit @#,schemevalfont{#o100}]
|
||||
@defthing[user-write-bit @#,schemevalfont{#o200}]
|
||||
@defthing[user-execute-bit @#,schemevalfont{#o400}]
|
||||
@defthing[group-read-bit @#,schemevalfont{#o010}]
|
||||
@defthing[user-read-bit @#,schemevalfont{#o400}]
|
||||
@defthing[user-write-bit @#,schemevalfont{#o200}]
|
||||
@defthing[user-execute-bit @#,schemevalfont{#o100}]
|
||||
@defthing[group-read-bit @#,schemevalfont{#o040}]
|
||||
@defthing[group-write-bit @#,schemevalfont{#o020}]
|
||||
@defthing[group-execute-bit @#,schemevalfont{#o040}]
|
||||
@defthing[other-read-bit @#,schemevalfont{#o001}]
|
||||
@defthing[group-execute-bit @#,schemevalfont{#o010}]
|
||||
@defthing[other-read-bit @#,schemevalfont{#o004}]
|
||||
@defthing[other-write-bit @#,schemevalfont{#o002}]
|
||||
@defthing[other-execute-bit @#,schemevalfont{#o004}]
|
||||
@defthing[other-execute-bit @#,schemevalfont{#o001}]
|
||||
)]{
|
||||
|
||||
Constants that are useful with @racket[file-or-directory-permissions]
|
||||
|
|
Loading…
Reference in New Issue
Block a user