go-coreutils icon indicating copy to clipboard operation
go-coreutils copied to clipboard

ls /root says "No such file or directory." instead of "Permission denied"

Open GypsyCosmonaut opened this issue 7 years ago • 3 comments

I did ls on /root from my user expecting that the command would show "Permission Denied". Instead it prints "No such file or directory".

The coreutils ls command indicates that I do not have permission to list /root folder by printing "Permission Denied".

I am new to Go. And am looking at this project in order to learn. Could someone please fix it.

GypsyCosmonaut avatar Nov 28 '18 00:11 GypsyCosmonaut

What OS are you doing running this command on? I'm aware that is is a linux type OS but, exactly which OS?

Floweynt avatar Aug 18 '19 03:08 Floweynt

It was Debian 9 at the time.

GypsyCosmonaut avatar Aug 18 '19 21:08 GypsyCosmonaut

does /root exist? check with cd / and then run ls

Floweynt avatar Aug 31 '19 01:08 Floweynt