From: "Óscar Fuentes" <ofv@wanadoo.es>
To: emacs-devel@gnu.org
Subject: Re: Emacs on Windows keeps complaining: the directory ... is unsafe.
Date: Tue, 26 May 2009 00:42:07 +0200 [thread overview]
Message-ID: <87iqjols8w.fsf@telefonica.net> (raw)
In-Reply-To: 83k544sw84.fsf@gnu.org
Hello Eli and Juanma.
Eli Zaretskii <eliz@gnu.org> writes:
>> Yesterday I refreshed my build of Emacs CVS on a Windows machine after
>> some months and it keeps complaining:
>>
>> error: The directory d:/home/.emacs.d/server is unsafe
>>
>> when calling server-start. I see no references to this problem on News
>> or Known Problems.
>
> That bug was fixed ages ago. The test is made only if Emacs runs on
> something other than Windows. Are you sure you don't have a stale
> server.el somewhere?
I'm sure it is using the server.el installed with `make install`.
BTW, only a part of the test is elided on windows. This is the test
expression:
(unless (and (eq t (car attrs)) (eql (nth 2 attrs) (user-uid))
(or (eq system-type 'windows-nt)
(zerop (logand ?\077 (file-modes dir)))))
(error "The directory %s is unsafe" dir))
>> Is there a cure for this? What I did until now is remove the check on
>> server.el, but this is hardly acceptable for the common user.
>
> What check did you remove, and how did it fail for you? If none of
> the above helps to solve the problem, please debug it like Juanma
> suggested, and post the results here.
>
> The first thing I'd look at is whether the owner of that directory (as
> returned by `file-attributes', for example, is the same as what
> `(user-uid)' returns on that system.
Thanks for the hint. This seems the problem:
the file uid returned by file-attributes is 544:
(file-attributes "d:/home/.emacs.d/server")
(t 1 544 513 (18971 5346) (18971 5346) (17735 22234) 0 "drwxrwxrwx" nil
(2360832 0 . 9198) (21721 . 11703))
and (user-uid) returns 500.
The directory is accesible only for Administrator (me). Even tried to
change the directory hierarchy where emacs is installed so only
Administrator can access it. (user-uid) still returns 500.
It's strange too the file modes string: "drwxrwxrwx" This is not
consistent with a directory accessible only by the current user
(Administrator). A cygwin shell shows this:
Administrator@k7 ~
$ ls -l .emacs.d/
total 1
d---------+ 2 Administrators None 0 May 26 00:31 server
----------+ 1 Administrators None 902 May 7 2008 tramp
d---------+ 2 Administrators None 0 Feb 17 2007 url
Have no idea what's going on.
--
Óscar
next prev parent reply other threads:[~2009-05-25 22:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 16:11 Emacs on Windows keeps complaining: the directory ... is unsafe Óscar Fuentes
2009-05-25 17:06 ` Juanma Barranquero
2009-05-25 21:34 ` Eli Zaretskii
2009-05-25 22:42 ` Óscar Fuentes [this message]
2009-05-25 23:57 ` Juanma Barranquero
2009-05-26 0:23 ` Óscar Fuentes
2009-05-26 0:27 ` Jason Rumney
2009-05-26 1:28 ` Óscar Fuentes
2009-05-26 3:16 ` Eli Zaretskii
2009-05-26 14:30 ` Óscar Fuentes
2009-05-26 19:42 ` Eli Zaretskii
2009-05-26 3:22 ` Eli Zaretskii
2009-05-26 14:33 ` Óscar Fuentes
2009-05-26 19:41 ` Eli Zaretskii
2009-05-26 21:00 ` Óscar Fuentes
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=87iqjols8w.fsf@telefonica.net \
--to=ofv@wanadoo.es \
--cc=emacs-devel@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.