Thus this failure is occuring due to some variable not stated in the chroot manpgage and that is not file ownership or permissions.
So, if some kind genie/guru could tell me the appropriate magic incantation to cast over this code to get it to chroot in both cases, I would appreciate it.
This is Perl 5.6.1 by the way.
sub ls_ld { my @dir = split '/', $_[0]; my $ret_text; for (2 .. $#dir) { my $path = join '/', @dir[0..$_]; my $ls_ld = `ls -ld $path`; $ret_text .= $ls_ld; } $ret_text; } my %dir = ( home => '/home/tmbranno', other => '/home/tmbranno/src/Net/FTPServer/ARU/ftp-dir/t' ); map { chroot $dir{$_} or die sprintf "cannot chroot: $dir{$_}: $!\n all paths of this:\n%s" +, ls_ld($dir{$_}) ; } (keys %dir);
{ap555sun:tmbranno:tmbranno_1693779_arulinkftp:arudev}133> /home/tmbra +nno/src/te sts[76C % perl chroot.pl perl chroot.pl cannot chroot: /home/tmbranno/src/Net/FTPServer/ARU/ftp-dir/t: Not own +er all paths of this: drwxr-xr-x 19 tmbranno g680 8192 May 8 15:52 /home/tmbranno drwxr-xr-x 15 tmbranno g680 8192 May 3 09:59 /home/tmbranno/s +rc drwxr-xr-x 3 tmbranno g680 96 May 3 09:59 /home/tmbranno/s +rc/Net drwxr-xr-x 3 tmbranno g680 96 May 3 09:59 /home/tmbranno/s +rc/Net/FTPServer drwxr-xr-x 7 tmbranno g680 8192 May 8 15:35 /home/tmbranno/s +rc/Net/FTPServer/ARU drwxr-xr-x 4 tmbranno g680 96 May 8 15:26 /home/tmbranno/s +rc/Net/FTPServer/ARU/ftp-dir drwxr-xr-x 2 tmbranno g680 96 May 8 17:20 /home/tmbranno/s +rc/Net/FTPServer/ARU/ftp-dir/t {ap555sun:tmbranno:tmbranno_1693779_arulinkftp:arudev}134> /home/tmbra +nno/src/te sts[76C %
In reply to chroot fails for no obvious reason by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |