Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a storage drive I normally mount just clicking on the disc in the file browser. However, I want to be able to run some bash scripts from that drive. When I try ./ I get Permission Denied. How can I set it up so I can run scripts from this drive?

share|improve this question
What filesystem is used on the drive in question? – dobey Jan 22 '13 at 21:10
@dobey I'm pretty sure its NTFS – schwiz Jan 22 '13 at 21:18
up vote 3 down vote accepted

Work Around

There is a simple work around, instead of ./, do




You should check the first line of to confirm which shell to use.

Manual Mount

Mount with command line, you can use the exec option as follow

mount -o exec <device> <mount-point/path>

mount -o exec /dev/cdrom /mnt/cdrom

If the disc is automounted, you will have to un-mount(not eject) it with file manager first.


This is the complicated way and is answered in this post.

share|improve this answer
No good, the script also tries to call other scripts and stuff getting permission denied. – schwiz Jan 22 '13 at 21:20
You may want to use the manual mount method. – John Siu Jan 22 '13 at 22:29
How do I know my arguments, usually the drive is called /media/Media not sure where to get the equivilent of /dev/cdrom /mnt/cdrom – schwiz Jan 23 '13 at 6:21
To check your cdrom/dvdrom dev path, put in a disc, wait for it to automount, then in a terminal type "mount", it should show up in the list. Possibiliteis: /dev/sr0 – John Siu Jan 23 '13 at 6:27
The second arguments is actually just any empty folder you created beforehand. Common ones to use are /mnt/cdrom, /media/cdrom – John Siu Jan 23 '13 at 6:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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