public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Permission denied when moving symlink across filesystems (but works)
@ 2022-09-21 20:16 Denis Excoffier
  0 siblings, 0 replies; only message in thread
From: Denis Excoffier @ 2022-09-21 20:16 UTC (permalink / raw)
  To: cygwin; +Cc: Denis Excoffier

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-09-21 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 20:16 Permission denied when moving symlink across filesystems (but works) Denis Excoffier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).