From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?windows-1252?Q?=D3scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs on Windows keeps complaining: the directory ... is unsafe. Date: Tue, 26 May 2009 00:42:07 +0200 Message-ID: <87iqjols8w.fsf@telefonica.net> References: <87skitkvr4.fsf@telefonica.net> <83k544sw84.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1243291360 20551 80.91.229.12 (25 May 2009 22:42:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 May 2009 22:42:40 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 26 00:42:33 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M8isL-0005du-6U for ged-emacs-devel@m.gmane.org; Tue, 26 May 2009 00:42:33 +0200 Original-Received: from localhost ([127.0.0.1]:60416 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8isK-00047z-H1 for ged-emacs-devel@m.gmane.org; Mon, 25 May 2009 18:42:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M8isG-00047c-0S for emacs-devel@gnu.org; Mon, 25 May 2009 18:42:28 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M8isB-00047I-3n for emacs-devel@gnu.org; Mon, 25 May 2009 18:42:27 -0400 Original-Received: from [199.232.76.173] (port=43040 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M8isA-000478-Rn for emacs-devel@gnu.org; Mon, 25 May 2009 18:42:22 -0400 Original-Received: from main.gmane.org ([80.91.229.2]:35960 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M8isA-0001Yo-DN for emacs-devel@gnu.org; Mon, 25 May 2009 18:42:22 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1M8is8-0007Sr-KE for emacs-devel@gnu.org; Mon, 25 May 2009 22:42:20 +0000 Original-Received: from 134.red-83-35-102.dynamicip.rima-tde.net ([83.35.102.134]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 May 2009 22:42:20 +0000 Original-Received: from ofv by 134.red-83-35-102.dynamicip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 25 May 2009 22:42:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 67 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 134.red-83-35-102.dynamicip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) Cancel-Lock: sha1:wnZbvnC2wzntfmwezZP1mJCkFmw= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:111094 Archived-At: Hello Eli and Juanma. Eli Zaretskii 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