LinuxSay - A Discussion Forum for Linux Enthusiasts

Permission denied while running command as root


#1

I encountered this seemingly funny error while using Ubuntu, even after getting root privileges, i was still not granted permission to execute my desired command. This is not the first time i have noticed it but i have been playing it cool. It has happened several times before with different commands.

I would like to know the possible causes of such an error especially on Ubuntu Linux.


#2

What’s the output of these commands? “when you are root”

whoami
id
grep 'root' /etc/passwd
ls -lh /bin/bash

#3

the output is below