I have plugged in a USB drive into my Kali linux machine and want to run exe file on it.
I tried to just execute the file by using
./test
but that gave me a permission denied error.
To solve this, I tried this:
sudo chmod ugo+rwx test
./test`
but that also did not work.
How do I give execute permissions to the exe?
>Solution :
To give execute permissions to an external drive in Kali Linux, you can follow these steps:
Connect the external drive to your computer and make sure it is mounted.
Open a terminal window.
Type the command mount and press Enter. This will display a list of all mounted devices on your system, including your external drive.
Identify the device name of your external drive. It will be listed in the output of the mount command and will look something like /dev/sdb1 or /dev/sdc1.
Type the command sudo chmod +x /media/[username]/[external_drive_name] and press Enter. Replace [username] with your username and [external_drive_name] with the name of your external drive.
Enter your password when prompted and press Enter.
The chmod command changes the permissions of the specified file or directory. The +x option grants execute permissions to the specified file or directory.
After following these steps, your external drive should have execute permissions and you should be able to run executable files from it