You are not logged in.
Hi, I'm very new to Arch Linux, and do a lot of programming on a memory stick. This means that I need to run executable files quite often off the memory stick (it works fine if I run it off my main ssd when I use chmod).
I have a problem where it says "bash: ./Test: Permission denied". I have had this problem for about a week and have been researching it heavily. I had narrowed it down to permissions when mounting, as you cannot use chmod on a vfat partition (from what I have experienced and researched).
However, I have edited fstab to give it the permission of rwx (which does not work for fstab as I have discovered) and rw when it is mounted at /mnt/usbstick or /run/media/usbstick.
I now have it set to "/dev/sdd1 /run/media/usbstick vfat user,rw". After restarting my computer, this make is so that any executable file is set to "-rwxr-xr-x" through 'ls -l'. However, when I try to run the executable 'Test' by typing "./Test" in the terminal, it still comes up with "bash: ./Test: Permission denied" - even though it is meant to have executable permission. I have also tried running it with sudo and root, however the output is the same. I have also tried to run it through GDB, which also prints out "Permission denied".
So, I was wondering if anyone knows anything that could help me here.
Thanks.
Last edited by DeDerpsta (2020-06-28 13:25:23)
Offline
What's the output of mount when the device is mounted?
You may well have it mounted with the noexec option.
Offline
Yes, thank you! It seems that was the case, I have now added "exec" to my fstab file and it now works! Thanks!
Offline