Re: confused about preserved permissions

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: confused about preserved permissions

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:30

Benoit SIGOURE [off-list ref] writes:
Let's look at the problem from another point of view then: I want my
*working tree* to be group readable even though my umask is 066.
I have to wonder if there is any sane development tool that
supports that kind of thing.  E.g. vi, emacs, gcc,...?  If you
allowed a tool to do that, what's the point of having a umask?

Re: confused about preserved permissions

From: David Kastrup <hidden>
Date: 2016-06-15 22:43:30

Junio C Hamano [off-list ref] writes:
Benoit SIGOURE [off-list ref] writes:
quoted
Let's look at the problem from another point of view then: I want my
*working tree* to be group readable even though my umask is 066.
I have to wonder if there is any sane development tool that
supports that kind of thing.  E.g. vi, emacs, gcc,...?  If you
allowed a tool to do that, what's the point of having a umask?
Hm?  Are we talking about the same Emacs here?  The thing that has a
directory editor built into it with which one can do chmod and so on?

Here are a few functions:

    executable-make-buffer-file-executable-if-script-p is an autoloaded Lisp function in `executable'.
    (executable-make-buffer-file-executable-if-script-p)

    Make file executable according to umask if not already executable.
    If file already has any execute bits set at all, do not change existing
    file modes.


----------------
dired-do-chmod
  Command: Change the mode of the marked (or next ARG) files.
This calls chmod, thus symbolic modes like `g+w' are allowed.

(fn &optional ARG)

----------------
executable-set-magic
  Command: Set this buffer's interpreter to INTERPRETER with optional ARGUMENT.
The variables `executable-magicless-file-regexp', `executable-prefix',
`executable-insert', `executable-query' and `executable-chmod' control
when and how magic numbers are inserted or replaced and scripts made
executable.

(fn INTERPRETER &optional ARGUMENT NO-QUERY-FLAG INSERT-FLAG)



However, Emacs does not provide a hook into the system call as far as
I can see: it calls chmod explicitly.


-- 
David Kastrup
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help