Skip to content

mv: a failed cross-device move always reports "Permission denied" #15939

Open

Description

@abendrothj

When mv copies a regular file to another filesystem, any error during the copy is printed as Permission denied, whatever the real cause was. With a full destination:

# mount -t tmpfs -o size=1m tmpfs /mnt/small
$ head -c 2M /dev/zero > big
$ mv big /mnt/small/big
mv: Permission denied

GNU 9.12 prints mv: error writing '/mnt/small/big': No space left on device. With an unreadable source, uutils prints the same mv: Permission denied, while GNU prints mv: cannot open 'src' for reading: Permission denied.

rename_file_fallback replaces each error's message with mv-error-permission-denied and keeps only the error kind, so the real cause and the file name are lost. This is also why #9458 says "Permission denied": the copy runs out of space.

Activity

  1. added a commit that references this issue on Oct 31, 2026
    e249b0f
  2. added a commit that references this issue on Nov 2, 2026
    7498804
  3. added a commit that references this issue on Nov 4, 2026
    66894e5
  4. added a commit that references this issue on Nov 14, 2026
    ebeaae0
  5. added a commit that references this issue on Nov 16, 2026
    b7a7b08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions