I recently got Linux, and wanted to run the game dwarf fortress in my USB flash drive. To run dwarf fortress on Linux you have to use ./df in the dwarf fortress folder, but when I use this command it says: bash: ./df: Permission denied
.
This happened a while ago when I wanted to run it in my NTFS partition, but I fixed it (I don't remember how.)
I would like to fix this, thank you.
Asked
Active
Viewed 163 times
-1

Anti.Josh
- 65
1 Answers
0
I figured out how to do this:
- Install GParted and plug on your USB drive.
- Once you opened GParted click the button on the upper-right corner, and select /dev/sdb.
- Right click on the bar that says /dev/sdb1 and click "unmount".
- Hover over "format to", then click ntfs.
- Open the terminal and write
sudo mkdir /media/flash
. - Open GParted and repeat step 2, then right click the sdb1 bar and click "properties".
- Look for the label
UUID:
and copy the text after that (for me it was)2DC5421719E725AA
. - Open the terminal again and write
sudo gedit /etc/fstab
, when gedit is open create a new line and typeUUID=xxxxxxxxxxxxxxxx /media/flash ntfs-3g fmask=0022,dmask=0000,uid=1000,gid=1000
(replace thexxxxxxxxxxxxxxxx
with the UUID you copied from GParted). - type
sudo umount /dev/stb1
thensudo mount /media/flash
.
Then you're done! Thanks to the people who helped in the comments.
./df
has exec permission turned off. In usual case, asudo chmod +x ./df
can save you already. But, usually it is not the case for NTFS. In addition to @bodhi.zazen, please look at (http://askubuntu.com/questions/30243/why-does-ubuntu-refuse-to-execute-files-from-an-ntfs-partition, http://askubuntu.com/questions/5069/cant-set-permissions-for-files-on-an-ntfs-partition, many more) – Abdillah Feb 02 '16 at 16:30ls -l df
to confirm. – Jacob Minshall Feb 02 '16 at 16:34sudo chmod +x ./df
bash prints the same error as before. Also, usingls -l df
prints:-rw-r--r-- 1 joshua joshua 245 Jan 17 22:44 df
. – Anti.Josh Feb 02 '16 at 18:30