unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 4197@emacsbugs.donarmstrong.com
Subject: bug#4197: 23.1; error when try to run `server-start': directory .emacs.d/server is	unsafe
Date: Fri, 21 Aug 2009 20:43:30 +0300	[thread overview]
Message-ID: <83bpm9gj0d.fsf@gnu.org> (raw)
In-Reply-To: <2BFC5C014BD64D93A209629F9B852FFC@us.oracle.com>

> From: "Drew Adams" <drew.adams@oracle.com>
> Cc: "'Lennart Borgman'" <lennart.borgman@gmail.com>
> Date: Fri, 21 Aug 2009 07:30:11 -0700
> 
> > I think this is the same as bug #865; merged.
> > What do the following three expression evaluate to, in the 
> > Emacs session that signals this error?
> > 
> >   (user-uid)
> 
> 19729
> 
> >   (file-attributes "c:/.emacs.d/server/" 'integer)
> 
> (t 1 0 0 (18967 40688) (18657 6612) (18657 6611) 0
>  "drwxrwxrwx" t (572354 . 24704) 240391127)
> 
> >   (file-attributes "c:/.emacs.d/server/" 'string)
> 
> (t 1 "Everyone" "Everyone" (18967 40688) (18657 6612)
>  (18657 6611) 0 "drwxrwxrwx" t (572354 . 24704) 240391127)

Ah! a FAT32 filesystem!

> If this is the same as #865, then I guess it is pretty old.

It's been on my TODO forever to fix this, and I even wrote some code
towards that goal.  But the problem is not easy to crack, since
Windows sometimes attribute files not to the user who created them,
but to the Administrators group instead, and that doesn't go well with
the Posix-at-heart code which triggers this error.  Eventually, we
will need to add more code to file-attributes and to make-directory,
so that Emacs could create really private directories on Windows.

> Dunno whether my
> laptop configuration (Windows XP SP3, with FAT32 drive) is atypical or not.

It's the FAT32 thing that trips you.  It doesn't support Windows
native security features, so every file is attributed to Everyone
(user-id of zero).  emacsclient wants to be sure the directory where
it places its socket file cannot be written to by any other user, but
the fact its owner is Everyone, not you, tells emacsclient that the
directory isn't private.

Can you perhaps convert the drive to NTFS?

> If not, until the bug is fixed you might consider changing the default value to
> nil, since this stops users with a similar config from using emacsclient at all
> (out of the box, emacs -Q). Unless they know about the workaround, that is.

We never heard about the problem until now, since Emacs 23 was
released (the original bug was reported long ago, when Emacs 23 was
still in development).  So it seems the problem is not too frequent:
the number of people who use emacsclient on a FAT32 volume or that
belong to the local Administrators group is apparently low enough for
this gotcha not to hit too frequently.

> Without your help, I never would have guessed it. I don't even understand the
> error message, "The directory is unsafe" - maybe that message could refer me to
> a manual section explaining unsafe directories?

I will add this to PROBLEMS, and look into modifying the message.  I
think the message text is not very clear even on Unix.  Thanks for
pointing this out.





  reply	other threads:[~2009-08-21 17:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-19  3:25 bug#4197: 23.1; error when try to run `server-start': directory .emacs.d/server is unsafe Drew Adams
2009-08-21  9:24 ` Eli Zaretskii
2009-08-21 14:30   ` Drew Adams
2009-08-21 17:43     ` Eli Zaretskii [this message]
2009-08-21 18:12       ` Drew Adams
2009-08-21 18:28         ` Eli Zaretskii
2009-08-21 18:55           ` Drew Adams
2009-08-21 20:35             ` Eli Zaretskii
2009-08-21 21:03               ` Drew Adams
2009-08-22 10:07               ` Eli Zaretskii
2009-08-22  4:49         ` Stefan Monnier
2009-08-22  8:07           ` Eli Zaretskii
2009-08-23  1:57             ` Stefan Monnier
2009-08-23  3:21               ` Eli Zaretskii
2009-08-23 22:30                 ` Stefan Monnier
2009-08-22  9:53           ` Jason Rumney
2009-08-22 10:35             ` Eli Zaretskii
2009-08-22 16:59               ` Jason Rumney
2009-08-22 17:10                 ` Lennart Borgman
2009-08-23  1:57                   ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83bpm9gj0d.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=4197@emacsbugs.donarmstrong.com \
    --cc=drew.adams@oracle.com \
    /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 public inbox

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

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).