* How to set umask, owner, and group for newly created file under Win2K?
@ 2003-12-21 7:43 Subhashis Mohanty
0 siblings, 0 replies; 5+ messages in thread
From: Subhashis Mohanty @ 2003-12-21 7:43 UTC (permalink / raw)
This question must have been asked many times, and truth be told, a search
of the web via Google and Emacs archives at gnu.org does find some hits,
but none answers the question how to set umask, owner and group for newly
created files in Emacs under Win2K.
. emacs-20.7
. Win2K SP4
. Open new file via C-x C-f
. Save file via C-x C-s
If I create a new file through another means (vi under cygwin bash), the
file perms, user, and group are as they should be (honouring the umask),
but under emacs the file perms are wrong, turning the execute bit on for
the user, and changing the username to Administrator.
There are no deviations from expected umask, username, and group in
emacs-21.2.1 under Linux 2.4.20-20.9smp.
Any help from the gurus?
Thanks
- Subhashis Mohanty
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set umask, owner, and group for newly created file under Win2K?
[not found] <6.0.0.22.0.20031220232158.0368c790@localhost:7014>
@ 2003-12-21 8:19 ` Eli Zaretskii
2003-12-21 9:47 ` Ehud Karni
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2003-12-21 8:19 UTC (permalink / raw)
> Date: Sat, 20 Dec 2003 23:43:29 -0800
> From: Subhashis Mohanty <smohanty@mohanty.com>
>
> . emacs-20.7
> . Win2K SP4
> . Open new file via C-x C-f
> . Save file via C-x C-s
>
> If I create a new file through another means (vi under cygwin bash), the
> file perms, user, and group are as they should be (honouring the umask),
> but under emacs the file perms are wrong, turning the execute bit on for
> the user, and changing the username to Administrator.
I'm guessing that your Emacs is not a Cygwin application. Native
Windows applications cannot change Unix-style user/group/world access
bits, since Windows doesn't support them. Cygwin applications provide
emulations of that support using available Windows access rights
machinery.
Summary: you can't have that on Windows, unless you use Emacs compiled
as a Cygwin program. You could work around this by invoking Cygwin
ports of chown/chmod from Emacs.
Perhaps you should tell why do you need this on Windows. Then maybe
someone could help you solve your specific problem(s).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set umask, owner, and group for newly created file under Win2K?
2003-12-21 8:19 ` Eli Zaretskii
@ 2003-12-21 9:47 ` Ehud Karni
0 siblings, 0 replies; 5+ messages in thread
From: Ehud Karni @ 2003-12-21 9:47 UTC (permalink / raw)
Cc: help-gnu-emacs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 21 Dec 2003 10:19:18 +0200, Eli Zaretskii <eliz@elta.co.il> wrote:
>
> > Date: Sat, 20 Dec 2003 23:43:29 -0800
> > From: Subhashis Mohanty <smohanty@mohanty.com>
> >
> > . emacs-20.7
> > . Win2K SP4
> > . Open new file via C-x C-f
> > . Save file via C-x C-s
> >
> > Uunder emacs the file perms are wrong, turning the execute bit on for
> > the user, and changing the username to Administrator.
>
> Summary: you can't have that on Windows, unless you use Emacs compiled
> as a Cygwin program. You could work around this by invoking Cygwin
> ports of chown/chmod from Emacs.
There is a Cygwin Emacs (version 21.2, ported by Joe Buehler) that works
both on terminal and X, but not on the native Windows screen. This will
do all you want.
Ehud.
- --
Ehud Karni Tel: +972-3-7966-561 /"\
Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign
Insurance agencies (USA) voice mail and X Against HTML Mail
http://www.mvs.co.il FAX: 1-815-5509341 / \
GnuPG: 98EA398D <http://www.keyserver.net/> Better Safe Than Sorry
-----BEGIN PGP SIGNATURE-----
Comment: use http://www.keyserver.net/ to get my key (and others)
iD8DBQE/5WwzLFvTvpjqOY0RAggfAJ9tvxHB7VgsnupMzAMi7RMLJT+p5gCfedG1
LsmVRb7MxHwK8MMQ3QcMHLU=
=vmT6
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set umask, owner, and group for newly created file under Win2K?
[not found] <mailman.421.1071996488.868.help-gnu-emacs@gnu.org>
@ 2003-12-21 11:11 ` Kai Grossjohann
2003-12-21 12:55 ` Jason Rumney
1 sibling, 0 replies; 5+ messages in thread
From: Kai Grossjohann @ 2003-12-21 11:11 UTC (permalink / raw)
Subhashis Mohanty <smohanty@mohanty.com> writes:
> This question must have been asked many times, and truth be told, a
> search of the web via Google and Emacs archives at gnu.org does find
> some hits, but none answers the question how to set umask, owner and
> group for newly created files in Emacs under Win2K.
I don't know anything about Windows, but I guess that the standard
Emacs function for determining the "umask" at least is
set-default-file-modes.
The owner is always the user you logged in as.
Don't know the group.
What do you want to do?
Kai
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to set umask, owner, and group for newly created file under Win2K?
[not found] <mailman.421.1071996488.868.help-gnu-emacs@gnu.org>
2003-12-21 11:11 ` Kai Grossjohann
@ 2003-12-21 12:55 ` Jason Rumney
1 sibling, 0 replies; 5+ messages in thread
From: Jason Rumney @ 2003-12-21 12:55 UTC (permalink / raw)
Subhashis Mohanty <smohanty@mohanty.com> writes:
> This question must have been asked many times, and truth be told, a
> search of the web via Google and Emacs archives at gnu.org does find
> some hits, but none answers the question how to set umask, owner and
> group for newly created files in Emacs under Win2K.
Windows 2000 does not have a concept of umask and group. When you
create files with Cygwin tools, other Cygwin tools are able to see an
emulated umask and group, but unless you are using the Cygwin version
of Emacs, it will not be visible to Emacs.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-12-21 12:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-21 7:43 How to set umask, owner, and group for newly created file under Win2K? Subhashis Mohanty
[not found] <6.0.0.22.0.20031220232158.0368c790@localhost:7014>
2003-12-21 8:19 ` Eli Zaretskii
2003-12-21 9:47 ` Ehud Karni
[not found] <mailman.421.1071996488.868.help-gnu-emacs@gnu.org>
2003-12-21 11:11 ` Kai Grossjohann
2003-12-21 12:55 ` Jason Rumney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).