diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml
index cc58940a9b..90f713b235 100644
--- a/.github/workflows/windows.yml
+++ b/.github/workflows/windows.yml
@@ -349,7 +349,6 @@ jobs:
TFLAGS+=' ~SCP ~SFTP' # Flaky: `-8, Unable to exchange encryption keys`. https://github.com/libssh2/libssh2/issues/804
fi
fi
- TFLAGS+=' ~613' # 'SFTP directory retrieval' SFTP, directory
if [ -x "$(cygpath "${SYSTEMROOT}/System32/curl.exe")" ]; then
TFLAGS+=" -ac $(cygpath "${SYSTEMROOT}/System32/curl.exe")"
fi
@@ -937,9 +936,7 @@ jobs:
if [[ '${{ matrix.install }}' = *'libssh2[core,zlib]'* ]]; then
TFLAGS+=' ~SCP ~SFTP' # Flaky: `-8, Unable to exchange encryption keys`. https://github.com/libssh2/libssh2/issues/804
fi
- if [ '${{ matrix.openssh }}' = '' ]; then # MSYS2 openssh
- TFLAGS+=' ~613' # 'SFTP directory retrieval' SFTP, directory
- else # OpenSSH-Windows
+ if [ -n '${{ matrix.openssh }}' ]; then # OpenSSH-Windows
TFLAGS+=' ~601 ~603 ~617 ~619 ~621 ~641 ~665 ~2004' # SCP
if [[ '${{ matrix.install }}' = *'libssh '* ]]; then
TFLAGS+=' ~614' # 'SFTP pre-quote chmod' SFTP, pre-quote, directory
diff --git a/tests/data/test613 b/tests/data/test613
index 42cb1ee413..a61d82afd9 100644
--- a/tests/data/test613
+++ b/tests/data/test613
@@ -11,8 +11,8 @@ directory
d????????? N U U N ??? N NN:NN asubdir
--rw?rw?rw? 1 U U 37 Jan 1 2000 plainfile.txt
--r-?r-?r-? 1 U U 47 Dec 31 2000 rofile.txt
+-rw??????? 1 U U 37 Jan 1 2000 plainfile.txt
+-r-??????? 1 U U 47 Dec 31 2000 rofile.txt
diff --git a/tests/data/test614 b/tests/data/test614
index 53d34137ca..11851a7456 100644
--- a/tests/data/test614
+++ b/tests/data/test614
@@ -12,8 +12,8 @@ directory
d????????? N U U N ??? N NN:NN asubdir
--r-?r-?r-? 1 U U 37 Jan 1 2000 plainfile.txt
--r-?r-?r-? 1 U U 47 Dec 31 2000 rofile.txt
+-r-??????? 1 U U 37 Jan 1 2000 plainfile.txt
+-r-??????? 1 U U 47 Dec 31 2000 rofile.txt
diff --git a/tests/libtest/test613.pl b/tests/libtest/test613.pl
index dee3b17543..3bcd32aa44 100755
--- a/tests/libtest/test613.pl
+++ b/tests/libtest/test613.pl
@@ -75,6 +75,7 @@ elsif ($ARGV[0] eq "postprocess")
my $logfile = $ARGV[2];
# Clean up the test directory
+ chmod 0666, "$dirname/rofile.txt";
unlink "$dirname/rofile.txt";
unlink "$dirname/plainfile.txt";
rmdir "$dirname/asubdir";
@@ -110,18 +111,11 @@ elsif ($ARGV[0] eq "postprocess")
# consistent for across all test systems and filesystems
push @canondir, "d????????? N U U N ??? N NN:NN $8\n";
} elsif ($1 eq "-") {
- # Replace missing group and other permissions with user
- # permissions (eg. on Windows) due to them being shown as *
- my ($u, $g, $o) = ($2, $3, $4);
- if($g eq "**") {
- $g = $u;
- }
- if($o eq "**") {
- $o = $u;
- }
+ # Ignore group and other permissions, because these may vary on
+ # some systems (e.g. on Windows)
# Erase user and group names, as they are not consistent across
# all test systems
- my $line = sprintf("%s%s?%s?%s?%5d U U %15d %s %s\n", $1,$u,$g,$o,$5,$6,$7,$8);
+ my $line = sprintf("%s%s???????%5d U U %15d %s %s\n", $1,$2,$5,$6,$7,$8);
push @canondir, $line;
} else {
# Unexpected format; just pass it through and let the test fail