I launch dired over Tramp (from Win machine to Linux server):

C-x d /plink:user@server|su:root@server:/path-to-folder-controlled-by-root/

Then I type "O" to chown a folder, but I get chown not supported on this system. Debugging, I can see the error stems from the definition of dired-of-chgrp, which makes the following verification :

  (if (memq system-type '(ms-dos windows-nt))
      (error "chgrp not supported on this system"))

which obviously fails, because my machine is Windows — but I'm not chowning on Windows. Removing these two lines allows me to use the function normally. I have the same issue with chgroup.

Does this mean my setup is incorrect, or is this a limitation? What would be a clean way to correct this? Just removing these two lines seems like a dirty hack.

  • 1
    M-x report-emacs-bug
    – phils
    Commented Jul 8, 2019 at 10:22

1 Answer 1


The proper fix would be

(if (and (memq system-type '(ms-dos windows-nt))
         (not (file-remote-p default-directory)))
    (error "chgrp not supported on this system"))

I've fixed this in the Emacs repository, will appear with Emacs 27.1.

  • Nice, thank you! I see that your code does not test if the distant system is Windows or not, is that because that type of verification is rare / difficult to make / useless ?
    – kotchwane
    Commented Jul 8, 2019 at 12:15
  • 1
    When you are on an MS Windows machine, Tramp does not give you access to another Windows machine. Commented Jul 8, 2019 at 12:26
  • I'm using Emacs-25.3 and need to apply this fix. In which file, is it applied?
    – Terry
    Commented Oct 18, 2019 at 15:13
  • You can see the patch at <git.savannah.gnu.org/cgit/emacs.git/commit/…> Commented Oct 19, 2019 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.