try chgrp id -g

This commit is contained in:
Viktor Szakats 2025-02-28 21:44:43 +01:00
parent 3d858c04e6
commit 52c33b2da4
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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