Permission denied when moving symlink across filesystems (but works)
Denis Excoffier
cygwin@Denis-Excoffier.org
Wed Sep 21 20:16:10 GMT 2022
Hello,
I see an unexpected error message when i move a symlink from a file system into another one.
However, it works perfectly, only the error message is under question.
How to reproduce:
jupiter% uname -a
CYGWIN_NT-10.0-17763 PC17470 3.3.6-341.x86_64 2022-09-06 06:25 UTC x86_64 Cygwin
jupiter% mount
(...)
F: on /cygdrive/f type ntfs (binary,posix=0,user,noumount,auto)
G: on /cygdrive/g type ntfs (binary,posix=0,user,noumount,auto)
(…)
jupiter% getfacl -n /cygdrive/f/xx /cygdrive/g/xx
# file: /cygdrive/f/xx
# owner: 1111111
# group: 1049089
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:other::r-x
# file: /cygdrive/g/xx
# owner: 1111111
# group: 1049089
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:other::r-x
jupiter% rm -f /cygdrive/f/xx/lcheck /cygdrive/g/xx/lcheck
jupiter% /usr/bin/ln -s xxxxxxx /cygdrive/f/xx/lcheck
jupiter% ls -aln /cygdrive/f/xx/lcheck
lrwxrwxrwx 1 1111111 1049089 7 Sep 21 17:35 /cygdrive/f/xx/lcheck -> xxxxxxx
jupiter% /usr/bin/mv /cygdrive/f/xx/lcheck /cygdrive/g/xx/lcheck
/usr/bin/mv: listing attributes of '/cygdrive/f/xx/lcheck': Permission denied
jupiter% ls -aln /cygdrive/f/xx/lcheck /cygdrive/g/xx/lcheck
ls: cannot access ‘/cygdrive/f/xx/lcheck’: No such file or directory
lrwxrwxrwx 1 1111111 1049089 7 Sep 21 17:35 /cygdrive/g/xx/lcheck -> xxxxxxx
jupiter%
The target of the link may be existing or not, absolute or relative, folder or
simple file, the message is still there.
The location of the symlink can be directly at the mount point or not, same message.
The symlink may be alone (like here) or part of a whole tree structure, same message.
However, if source dir and target dir all reside in the same file system, no message.
The type of symlink is the default one (i can see ‘<JUNCTION>’ in DOS cmd window).
This also occurs (occurred) under 3.3.5, and 3.3.4-2 at least.
Could it be intended behavior?
Regards,
Denis Excoffier.
More information about the Cygwin
mailing list