all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Execute permission on Windows XP emacs 22.1
Date: Mon, 09 Jul 2007 17:42:24 +0300	[thread overview]
Message-ID: <u644tbpv3.fsf@gnu.org> (raw)
In-Reply-To: <20070709134653.GC14208@void.printf.net> (message from Pete Gillin on Mon, 9 Jul 2007 14:46:53 +0100)

> Date: Mon, 9 Jul 2007 14:46:53 +0100
> From: Pete Gillin <pete@void.printf.net>
> Cc: help-gnu-emacs@gnu.org
> 
> > How did you look at the permission bits in your case?
> 
> Using the Security tab of the Properties panel of Windows Explorer.

In that case, it's expected: as you wrote (and I misunderstood), this
is the default for files created on Windows, and Emacs uses the
defaults here.

> (1) When I call set-default-file-modes, the value returned by
> default-file-modes is not what I set (apparently ORed with 177).

This is also expected: the Windows version of `umask' supports only
Read and Write bits for the owner, everything else is stripped away.
So 644 is equivalent to 777, which would explain the apparent ORing
with 177.

> That might well be the cause of the problem I'm seeing. If emacs is
> using the basic API which does not include the "more elaborate access
> permissions" you mention, Windows will be filling in the default
> values, and the default value for Read & Execute is Allow.

Yes.

> It would
> also explain the disparity between what dired shows and what the
> Windows Explorer Property pane shows, because dired isn't reading the
> "more elaborate access permissions" either.

Yes.

> This wouldn't directly explain why there's a discrepancy between the
> the value given to I set-default-file-modes and the value returned by
> default-file-modes, but maybe emacs doesn't bother maintaining an
> execute bit or group/other bits which it knows it can do nothing with
> (using the basic API, as it does).

Emacs doesn't maintain any of these bits, it just calls the `umask' in
the Windows library.  It's `umask' that maintains the bits, and as
explained above, the Windows implementation only maintains two bits:
200 and 400.

So now that we established the reasons for what you saw, is there some
real problem where this (mis)behavior gets in your way?  If the
problem is the Cygwin port of SVN client, then either it has some
workaround for this, or it really means you to use only Cygwin
programs (which presumably manipulate the permissions through the
Windows Security API).  Or maybe you can find a native Windows port of
SVN client, that will not pay attention to the security information.

  reply	other threads:[~2007-07-09 14:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-09  9:14 Execute permission on Windows XP emacs 22.1 Pete Gillin
2007-07-09 12:19 ` Eli Zaretskii
2007-07-09 13:46   ` Pete Gillin
2007-07-09 14:42     ` Eli Zaretskii [this message]
2007-07-09 15:03       ` Pete Gillin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u644tbpv3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.