-1

This question already has an answer here:

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.

marked as duplicate by muru command-line Feb 3 '16 at 17:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    probably a permissions problem. Tons of posts on this issue - askubuntu.com/questions/209490/… – Panther Feb 2 '16 at 16:26
  • Your file ./df has exec permission turned off. In usual case, a sudo chmod +x ./df can save you already. But, usually it is not the case for NTFS. In addition to @bodhi.zazen, please look at (askubuntu.com/questions/30243/…, askubuntu.com/questions/5069/…, many more) – Abdillah Feb 2 '16 at 16:30
  • probably permissions problem as mentioned above. Please output ls -l df to confirm. – Jacob Minshall Feb 2 '16 at 16:34
  • Sorry for replying so late. Anyway, when I use sudo chmod +x ./df bash prints the same error as before. Also, using ls -l df prints: -rw-r--r-- 1 joshua joshua 245 Jan 17 22:44 df. – Anti.Josh Feb 2 '16 at 18:30
0

I figured out how to do this:

  1. Install GParted and plug on your USB drive.
  2. Once you opened GParted click the button on the upper-right corner, and select /dev/sdb.
  3. Right click on the bar that says /dev/sdb1 and click "unmount".
  4. Hover over "format to", then click ntfs.
  5. Open the terminal and write sudo mkdir /media/flash.
  6. Open GParted and repeat step 2, then right click the sdb1 bar and click "properties".
  7. Look for the label UUID: and copy the text after that (for me it was) 2DC5421719E725AA.
  8. Open the terminal again and write sudo gedit /etc/fstab, when gedit is open create a new line and type UUID=xxxxxxxxxxxxxxxx /media/flash ntfs-3g fmask=0022,dmask=0000,uid=1000,gid=1000(replace the xxxxxxxxxxxxxxxx with the UUID you copied from GParted).
  9. type sudo umount /dev/stb1 then sudo mount /media/flash.

Then you're done! Thanks to the people who helped in the comments.

Not the answer you're looking for? Browse other questions tagged or ask your own question.