bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11912: 24.1; 'M' in Dired on a symlink does not refresh the display


From: Lars Ingebrigtsen
Subject: bug#11912: 24.1; 'M' in Dired on a symlink does not refresh the display
Date: Tue, 24 Aug 2021 17:40:28 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

"Michalis V." <mvar.40k@gmail.com> writes:

> I can reproduce this in 27.1 but in 28.0.50 i get the following message:
>
> Doing chmod: Operation not supported, /tmp/foobar
>
> chmod on the symlinked file itself works ("Redisplaying..." too)
>
> perhaps this functionality was disabled/removed for symlinks on purpose?
> or is it a new bug?

In Linux you can't change the permissions on a symlink (they're always
777):

       chmod never changes the permissions of symbolic links; the chmod system
       call cannot change their permissions.  This is not a problem since  the
       permissions  of  symbolic links are never used. 

So I'm surprised that the `M' command even tries to do the chmod on the
symlink.  This was apparently done as part of a security audit:

commit 9d626dffc6ba62c0d7a1a5c712f576ed8684fd66
Author:     Paul Eggert <eggert@cs.ucla.edu>
AuthorDate: Sun Feb 23 16:19:42 2020 -0800

    Add 'nofollow' flag to set-file-modes etc.
    
    This avoids some race conditions (Bug#39683).  E.g., if some other
    program changes a file to a symlink between the time Emacs creates
    the file and the time it changes the file’s permissions, using the
    new flag prevents Emacs from inadvertently changing the
    permissions of a victim in some completely unrelated directory.

Hm.  I'm not sure why this should affect the `M' command in dired, though...

I've added Paul to the CCs; perhaps he has some comments.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]