From 52c33b2da4361ec82c624261320693bb6362ead2 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Fri, 28 Feb 2025 21:44:43 +0100 Subject: [PATCH] try chgrp id -g --- tests/sshserver.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/sshserver.pl b/tests/sshserver.pl index fa4ddbf840..e5de835e87 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -36,6 +36,10 @@ use Digest::SHA; use Digest::SHA 'sha256_base64'; use MIME::Base64; use File::Basename; +use POSIX qw(getgid); + +my $gid = getgid(); +print "$gid\n"; #*************************************************************************** # Variables and subs imported from sshhelp module @@ -424,7 +428,7 @@ if((! -e pp($hstprvkeyf)) || (! -s pp($hstprvkeyf)) || if($^O eq 'cygwin' || $^O eq 'msys') { # https://cygwin.com/cygwin-ug-net/setfacl.html system "setfacl --remove-all " . pp($hstprvkeyf); - system "chgrp None " . pp($hstprvkeyf); + system "chgrp " . getgid() . " " . pp($hstprvkeyf); } elsif($^O eq 'MSWin32') { # https://ss64.com/nt/icacls.html