in reply to Net::OpenSSH, strict_mode parameter not working
Not only the directory itself but all the parent directories up to the home dir have to conform to the security model enforced by the module. The relevant parts can be found in the source in the sub _is_secure_path:
my @parts = File::Spec->splitdir(Cwd::realpath($path)); my $home = $self->{_home}; for my $last (reverse 0..$#parts) { ... return undef unless(($uid == $> or $uid == 0 ) and (($mode & +022) == 0)); return 1 if (defined $home and $home eq $dir);
So all dirs from .libnet-openssh-perl to $home (or / if $home is not defined) have to be owned either by the effective user or root and must not have any write permissions for group and other
|
|---|