public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Denis Excoffier <cygwin@Denis-Excoffier.org>
To: cygwin@cygwin.com
Cc: Denis Excoffier <cygwin@Denis-Excoffier.org>
Subject: Permission denied when moving symlink across filesystems (but works)
Date: Wed, 21 Sep 2022 22:16:10 +0200	[thread overview]
Message-ID: <D6C8A7E8-BD7E-4A82-A648-9A57054D3FA9@Denis-Excoffier.org> (raw)

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.

                 reply	other threads:[~2022-09-21 20:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D6C8A7E8-BD7E-4A82-A648-9A57054D3FA9@Denis-Excoffier.org \
    --to=cygwin@denis-excoffier.org \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).