[SOLVED] New Format and Installed PVE 8.3 , XXX failed: Insecure directory in $ENV{PATH}……/IPC/Open3.pm

light999

New Member
Dec 1, 2024
2
1
1
I used PVE 7.4-3 originally. Recently, I found that many operations on the web page cannot be performed, even through ssh, vzdump and other operations cannot be performed.
The error returned is

Code:
command 'ionice -c2 -n7 -p 5818' failed: Insecure directory in $ENV{PATH} while running with -T switch at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178.

I formatted the disk and just reinstalled PVE 8.3-1. I want to upload the img file on the web page, and the error is:
Code:
starting file import from: /var/tmp/pveupload-65f0e40cc6c9c8d514d7a2a6d1fbad88
command '/usr/bin/qemu-img info '--output=json' /var/tmp/pveupload-65f0e40cc6c9c8d514d7a2a6d1fbad88' failed: Insecure directory in $ENV{PATH} while running with -T switch at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 176.
TASK ERROR: failed to query file information with qemu-img

When I want to create a virtual machine, the error is:
Code:
command '/usr/bin/kvm --version' failed: Insecure directory in $ENV{PATH} while running with -T switch at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 176.
TASK ERROR: format error at /usr/share/perl5/PVE/JSONSchema.pm line 2221 creation-qemu: value does not match the regex pattern

I searched on Google and this forum, but did not find a suitable answer. I would like to ask for guidance from experts.
 
Hi,
please log in as root and run echo $PATH. Did you do any special modifications to the environment or /etc/profile after installing the system?
 
Hi,
please log in as root and run echo $PATH. Did you do any special modifications to the environment or /etc/profile after installing the system?
Thanks, I've paid to a expert to solve it.

Details:

/usr/sbin /usr/bin , the two folder are in the $PATH, and their modifying rights should be ( ls -ld /usr/sbin /usr/bin) :

drwxr-xr-x 2 root root 32768 Dec 2 21:17 /usr/bin
drwxr-xr-x 2 root root 20480 Dec 2 21:18 /usr/sbin

Well , the PVE is installed in UGreen Nas(maybe many Chinese use this hardware to install PVE) ,and I accidently boot to UGreen OS, the OS modified that two folders' rights. They become drwxrwxrwx(777) , and this may be unsafe in PVE command and throw ERR.

The Solution is to restore their rights to initial status.

chmod 755 /usr/sbin
chmod 755 /usr/bin

Well Done.
 
  • Like
Reactions: fiona