From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Bernardo Newsgroups: gmane.emacs.help Subject: Re: Emacs cannot write file in a Virtual Box shared folder Date: Wed, 23 Oct 2019 21:07:35 +1100 Message-ID: <87lftbepw8.fsf@pobox.com> References: <8736fmfo77.fsf@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="191005"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Oct 23 12:46:22 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iNE9m-000nRG-8B for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Oct 2019 12:46:22 +0200 Original-Received: from localhost ([::1]:60142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNE9k-0007LN-Sv for geh-help-gnu-emacs@m.gmane.org; Wed, 23 Oct 2019 06:46:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40574) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNDYR-0005b2-1p for help-gnu-emacs@gnu.org; Wed, 23 Oct 2019 06:07:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNDYO-0003U5-J1 for help-gnu-emacs@gnu.org; Wed, 23 Oct 2019 06:07:46 -0400 Original-Received: from pecan2-mail.exetel.com.au ([220.233.0.71]:41707 helo=pecan2.exetel.com.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iNDYM-0003Oj-Kx for help-gnu-emacs@gnu.org; Wed, 23 Oct 2019 06:07:42 -0400 Original-Received: from 98.199.233.220.static.exetel.com.au ([220.233.199.98] helo=deb) by pecan2.exetel.com.au with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.91) (envelope-from ) id 1iNDYF-0002Bq-Qg for help-gnu-emacs@gnu.org; Wed, 23 Oct 2019 21:07:35 +1100 In-Reply-To: (Robert Pluim's message of "Tue, 22 Oct 2019 16:35:40 +0200") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 220.233.0.71 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121700 Archived-At: Robert Pluim writes: >>>>>> On Mon, 21 Oct 2019 20:22:04 +1100, Bernardo said: > > Bernardo> Greetings, > > Bernardo> Running GNU Emacs in Debian (9.11) VM guest under VirtualBo= x host (6.0.14) running on Windows 10 box. > Bernardo> (hope all this makes sense) > > Bernardo> Am having problems editing files located in a Virtual Box s= hared > Bernardo> directory. The directory is owned by root but members of 'v= boxsf' > Bernardo> group have read/write/execute rights. Emacs user is a memb= er of > Bernardo> 'vboxsf' group. > > Bernardo> $ groups > Bernardo> some_user cdrom sudo audio bluetooth vboxsf > > Bernardo> The (old) version of Emacs that comes with Debian reads/wri= tes files ok; > Bernardo> GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.= 11) of 2017-09-12 on hullmann, modified by Debian > > Bernardo> The version of Emacs that's built from Git repos cannot wri= te > Bernardo> file. Also by default it opens the file in read-only mode. > Bernardo> GNU Emacs 27.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Ver= sion 3.22.11) of 2019-10-21 > > Bernardo> Debugger entered--Lisp error: (file-error "Unlocking file" = "Operation not permitted" "/media/sf_Home/zz_stuff") > Bernardo> write-region(nil nil "/media/sf_Home/zz_stuff" nil t "/me= dia/sf_Home/zz_stuff") > Bernardo> basic-save-buffer-2() > Bernardo> basic-save-buffer-1() > Bernardo> basic-save-buffer(t) > Bernardo> save-buffer(1) > Bernardo> funcall-interactively(save-buffer 1) > Bernardo> call-interactively(save-buffer nil nil) > Bernardo> command-execute(save-buffer) > > Looks like emacs is trying to create/delete a lockfile, and > failing. Does /media/sf_Home support symlinks? > > You can work around this temporarily by customizing 'create-lockfiles' > to nil, but then emacs won't detect if you=CA=BCre editing the same file > from a different emacs session. > > Robert > Thanks Robert and Eli. You were spot on, the symlinks cannot be created on this file system, vboxsf, which seems to be a layer on top of NTFS. $ mount | grep sf_Home Home on /media/sf_Home type vboxsf (rw,nodev,relatime, $ ln -s zz_stuff my_link ln: failed to create symbolic link 'my_link': Operation not permitted Will be reporting this as a bug, the manual says: (1) If your file system does not support symbolic links, a regular file is used. =20=20=20=20=20=20=20 M-: (info "(emacs) Interlocking") RET It looks like the old version of Emacs (24.5.1) was creating lock files elsewhere and not in the directory where the edited file is located. -- cheers