I am running an Ubuntu Server 18.04 on QEMU, and installed expect using
sudo snap install expect.
From inside expect, I get permission denied for many things, e.g.:
expect1.1> ls . /bin/ls: cannot open directory '.': Permission denied child process exited abnormally while executing "exec >&@stdout <@stdin /bin/ls ." invoked from within "ls ."
expect1.2> stat . File: '.' [...] Access: (0755/drwxr-xr-x) Uid: ( 1000/ oren) Gid: ( 1000/ oren) [...]
I tried running expect using
sudo expect, but got the same behavior.
ls .. from within expect works fine.
Why do I get the "Permission denied" error?