I want to be able to run fdisk -l
as any user, without getting the whole fdisk: cannot open /dev/sda: Permission denied
message.
I don't see how fdisk -l
can be used for malicious purposes.
I have a PHP script, which first checks if the user is logged into my website, and if they are admin.
Then I have an admin control panel, where it shows the output of fdisk -l
, however, I am getting the error fdisk: cannot open /dev/sda: Permission denied
.
There is no user input, so they can't inject arguments into the command.