-1

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.

  • 1
    probably a permissions problem. Tons of posts on this issue - http://askubuntu.com/questions/209490/permissions-on-automounted-ntfs-drive – Panther Feb 02 '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 (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:30
  • probably permissions problem as mentioned above. Please output ls -l df to confirm. – Jacob Minshall Feb 02 '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 02 '16 at 18:30

1 Answers1

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.

bummi
  • 394
  • 3
  • 9
  • 14