GNU bug report logs - #75538
31.0.50; make-symbolic-link arg broken on ms-windows

Previous Next

Package: emacs;

Reported by: kkkykin <at> foxmail.com

Date: Mon, 13 Jan 2025 15:40:02 UTC

Severity: normal

Found in version 31.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75538 in the body.
You can then email your comments to 75538 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#75538; Package emacs. (Mon, 13 Jan 2025 15:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to kkkykin <at> foxmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 13 Jan 2025 15:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: kkkykin <at> foxmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 31.0.50; make-symbolic-link arg broken on ms-windows
Date: Mon, 13 Jan 2025 22:52:28 +0800
Here is an example, this bug seems only on ms-windows:

(let ((tmp (make-temp-file "link-test"))
      (link (make-temp-name "link")))
  (make-symbolic-link tmp link t) ; here is ok
  ;; error occur, the third argument should suppress the error
  (make-symbolic-link tmp link t))



In GNU Emacs 31.0.50 (build 1, x86_64-w64-mingw32) of 2025-01-03 built
 on fv-az1495-740
Repository revision: 299a1fbef886dba654f58a0c55b373f8b43d383b
Repository branch: HEAD
Windowing system distributor 'Microsoft Corp.', version 10.0.22631
System Description: Microsoft Windows 10 Pro (v10.0.2009.22631.4602)

Configured using:
 'configure
 --prefix=/d/a/emacs-build/emacs-build/pkg/299a1fb-ucrt-x86_64
 'CFLAGS=-O2 -fno-semantic-interposition -floop-parallelize-all
 -ftree-parallelize-loops=4 -g3 ' --disable-build-details --without-dbus
 --enable-link-time-optimization --enable-build-details
 --with-compress-install --with-small-ja-dic --with-gif --with-gnutls
 --with-harfbuzz --with-jpeg --with-json --with-lcms2 --with-mps
 --with-native-compilation --with-png --with-rsvg --with-tree-sitter
 --with-xml2 --with-xpm --with-zlib --without-cairo --without-tiff'

Configured features:
ACL GIF GMP GNUTLS HARFBUZZ JPEG LCMS2 LIBXML2 MODULES MPS NATIVE_COMP
NOTIFY W32NOTIFY PDUMPER PNG RSVG SOUND SQLITE3 THREADS
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XPM ZLIB

Important settings:
  value of $LANG: CHS
  locale-coding-system: cp936

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search time-date subr-x mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils bug-report china-util rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel touch-screen dos-w32 ls-lisp disp-table term/w32-win
w32-win w32-vars term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode
register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads w32notify w32 lcms2 multi-tty move-toolbar make-network-process
tty-child-frames native-compile mps emacs)

Memory information:
((conses 24 0 0) (symbols 56 0 0) (strings 40 0 0) (string-bytes 1 0)
 (vectors 24 0) (vector-slots 8 0 0) (floats 24 0 0)
 (intervals 64 0 0) (buffers 1000 0))





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75538; Package emacs. (Mon, 13 Jan 2025 17:10:02 GMT) Full text and rfc822 format available.

Message #8 received at 75538 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: kkkykin <at> foxmail.com
Cc: 75538 <at> debbugs.gnu.org
Subject: Re: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows
Date: Mon, 13 Jan 2025 19:08:58 +0200
> From: kkkykin <at> foxmail.com
> Date: Mon, 13 Jan 2025 22:52:28 +0800
> 
> 
> Here is an example, this bug seems only on ms-windows:
> 
> (let ((tmp (make-temp-file "link-test"))
>       (link (make-temp-name "link")))
>   (make-symbolic-link tmp link t) ; here is ok
>   ;; error occur, the third argument should suppress the error
>   (make-symbolic-link tmp link t))

I cannot reproduce this, your example works for me as expected on
MS-Windows (same version as you are using), and creates the symlink
without any errors.  What error message did you see from the second
call?

Maybe your Windows user doesn't have the necessary privileges or
something?  What happens if you run Emacs from a cmd.exe window that
was started by "Run as Administrator"?

Or maybe your filesystem on which you do this is something strange.
is that a local disk formatted as NTFS?  What happens if you insert
(sleep-for 10) between the two calls to make-symbolic-link?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75538; Package emacs. (Tue, 14 Jan 2025 11:45:02 GMT) Full text and rfc822 format available.

Message #11 received at 75538 <at> debbugs.gnu.org (full text, mbox):

From: "kkky" <kkkykin <at> foxmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 75538 <75538 <at> debbugs.gnu.org>
Subject: 回复: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows
Date: Tue, 14 Jan 2025 19:44:37 +0800
[Message part 1 (text/plain, inline)]
Thank you for your help.


The error is `file-error "Making symbolic link" "Operation not permitted"`


When i run as administrator, it is solved.


------------------ 原始邮件 ------------------
发件人:                                                                                                                        "Eli Zaretskii"                                                                                    <eliz <at> gnu.org&gt;;
发送时间:&nbsp;2025年1月14日(星期二) 凌晨1:08
收件人:&nbsp;"kkky"<kkkykin <at> foxmail.com&gt;;
抄送:&nbsp;"75538"<75538 <at> debbugs.gnu.org&gt;;
主题:&nbsp;Re: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows



&gt; From: kkkykin <at> foxmail.com
&gt; Date: Mon, 13 Jan 2025 22:52:28 +0800
&gt; 
&gt; 
&gt; Here is an example, this bug seems only on ms-windows:
&gt; 
&gt; (let ((tmp (make-temp-file "link-test"))
&gt;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; (link (make-temp-name "link")))
&gt; &nbsp; (make-symbolic-link tmp link t) ; here is ok
&gt; &nbsp; ;; error occur, the third argument should suppress the error
&gt; &nbsp; (make-symbolic-link tmp link t))

I cannot reproduce this, your example works for me as expected on
MS-Windows (same version as you are using), and creates the symlink
without any errors.&nbsp; What error message did you see from the second
call?

Maybe your Windows user doesn't have the necessary privileges or
something?&nbsp; What happens if you run Emacs from a cmd.exe window that
was started by "Run as Administrator"?

Or maybe your filesystem on which you do this is something strange.
is that a local disk formatted as NTFS?&nbsp; What happens if you insert
(sleep-for 10) between the two calls to make-symbolic-link?
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75538; Package emacs. (Tue, 14 Jan 2025 14:05:02 GMT) Full text and rfc822 format available.

Message #14 received at 75538 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "kkky" <kkkykin <at> foxmail.com>
Cc: 75538 <at> debbugs.gnu.org
Subject: Re: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows
Date: Tue, 14 Jan 2025 16:03:19 +0200
> From: "kkky" <kkkykin <at> foxmail.com>
> Cc: "75538" <75538 <at> debbugs.gnu.org>
> Date: Tue, 14 Jan 2025 19:44:37 +0800
> 
> Thank you for your help.
> 
> The error is `file-error "Making symbolic link" "Operation not permitted"`
> 
> When i run as administrator, it is solved.

OK, so I'm quite sure this is an issue with your user's privileges.
If you have enough control of this system, you should be able to
modify your privileges to add symlink creation.  I forget how I did
that, but you will find enough recipes on the Internet.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#75538; Package emacs. (Wed, 15 Jan 2025 15:57:02 GMT) Full text and rfc822 format available.

Message #17 received at 75538 <at> debbugs.gnu.org (full text, mbox):

From: "kkky" <kkkykin <at> foxmail.com>
To: "Eli Zaretskii" <eliz <at> gnu.org>
Cc: 75538 <75538 <at> debbugs.gnu.org>
Subject: Re: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows
Date: Wed, 15 Jan 2025 23:55:50 +0800
[Message part 1 (text/plain, inline)]
Ok thanks, completely solved the problem.


Because I was able to make symbolic link for the first time, I didn't expect the privilege issue. :)







        



         Original
         
       
From:                  Eli Zaretskii         eliz <at> gnu.org                 
Sent Time:         2025-01-14- 22:03 
To:                  kkky         kkkykin <at> foxmail.com                 
Cc:                  75538         75538 <at> debbugs.gnu.org                 
Subject:         Re: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows 



       &gt; From: "kkky"
&gt; Cc: "75538" <75538 <at> debbugs.gnu.org&gt;
&gt; Date: Tue, 14 Jan 2025 19:44:37 +0800
&gt;
&gt; Thank you for your help.
&gt;
&gt; The error is `file-error "Making symbolic link" "Operation not permitted"`
&gt;
&gt; When i run as administrator, it is solved.

OK, so I'm quite sure this is an issue with your user's privileges.
If you have enough control of this system, you should be able to
modify your privileges to add symlink creation.  I forget how I did
that, but you will find enough recipes on the Internet.
[Message part 2 (text/html, inline)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Wed, 15 Jan 2025 16:25:02 GMT) Full text and rfc822 format available.

Notification sent to kkkykin <at> foxmail.com:
bug acknowledged by developer. (Wed, 15 Jan 2025 16:25:02 GMT) Full text and rfc822 format available.

Message #22 received at 75538-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "kkky" <kkkykin <at> foxmail.com>
Cc: 75538-done <at> debbugs.gnu.org
Subject: Re: bug#75538: 31.0.50; make-symbolic-link arg broken on ms-windows
Date: Wed, 15 Jan 2025 18:24:47 +0200
> From: "kkky" <kkkykin <at> foxmail.com>
> Cc: "75538" <75538 <at> debbugs.gnu.org>
> Date: Wed, 15 Jan 2025 23:55:50 +0800
> 
> Ok thanks, completely solved the problem.
> 
> Because I was able to make symbolic link for the first time, I didn't expect the privilege issue. :)

Thanks, so I'm now closing this bug.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 13 Feb 2025 12:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.