Install libstat-lsmode-perl by entering the following commands in the terminal:
sudo apt update sudo apt install libstat-lsmode-perl
Perl module to format file modes like ls -l
Stat::lsMode provides Perl functions to format file modes in the same way that ls -l does (into strings like drwxr-xr-x, for example). It handles all the expected variations, including setuid, setgid, and sticky bits and special file types.