From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83bpm9gj0d.fsf@gnu.org> References: <86F491CE4D5C4E80B9B4FD5F110C3F12@us.oracle.com> <83ocq9h63s.fsf@gnu.org> <2BFC5C014BD64D93A209629F9B852FFC@us.oracle.com> Reply-To: Eli Zaretskii , 4197@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1250878051 18855 80.91.229.12 (21 Aug 2009 18:07:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Aug 2009 18:07:31 +0000 (UTC) Cc: 4197@emacsbugs.donarmstrong.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 21 20:07:24 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MeYWH-0002dJ-Tx for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 20:07:22 +0200 Original-Received: from localhost ([127.0.0.1]:38296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeYWH-00043M-AX for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Aug 2009 14:07:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MeYVx-0003gB-PI for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 14:07:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MeYVr-0003Xw-2P for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 14:06:59 -0400 Original-Received: from [199.232.76.173] (port=58634 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MeYVq-0003XV-F1 for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 14:06:54 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:37227) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MeYVp-0008Ic-Mg for bug-gnu-emacs@gnu.org; Fri, 21 Aug 2009 14:06:54 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7LI6pfv025007; Fri, 21 Aug 2009 11:06:52 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id n7LHo4tG021420; Fri, 21 Aug 2009 10:50:04 -0700 Resent-Date: Fri, 21 Aug 2009 10:50:04 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Eli Zaretskii Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 21 Aug 2009 17:50:04 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 4197 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 4197-submit@emacsbugs.donarmstrong.com id=B4197.125087673720841 (code B ref 4197); Fri, 21 Aug 2009 17:50:04 +0000 Original-Received: (at 4197) by emacsbugs.donarmstrong.com; 21 Aug 2009 17:45:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from mtaout6.012.net.il (mtaout6.012.net.il [84.95.2.16]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n7LHjYjl020832 for <4197@emacsbugs.donarmstrong.com>; Fri, 21 Aug 2009 10:45:36 -0700 Original-Received: from conversion-daemon.i-mtaout6.012.net.il by i-mtaout6.012.net.il (HyperSendmail v2007.08) id <0KOQ00I00MF7IF00@i-mtaout6.012.net.il> for 4197@emacsbugs.donarmstrong.com; Fri, 21 Aug 2009 20:45:28 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.180.85]) by i-mtaout6.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KOQ007HAMNRHS50@i-mtaout6.012.net.il>; Fri, 21 Aug 2009 20:45:28 +0300 (IDT) In-reply-to: <2BFC5C014BD64D93A209629F9B852FFC@us.oracle.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 21 Aug 2009 14:06:59 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:30446 Archived-At: > From: "Drew Adams" > Cc: "'Lennart Borgman'" > 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.