Execute file from ROM folder = Permission denied
-
You are correct. Sorry I wasn't more clear on that. From what you said, the default behavior of mounting via USB will set it up for
noexec
? I'm a novice at linux, so I'm still learning to understand how things work.pi@retropie:~ $ cat /etc/fstab
proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
# a swapfile is not a swap partition, no line here
# use dphys-swapfile swap[on|off] for that
Thanks!
-
Ooops! Your USB stick isn't on fstab. Could you paste here the output of
mount
? (yes, justmount
) -
Here you go!
pi@retropie:~/BACKUP_SCRIPT $ mount /dev/mmcblk0p2 on / type ext4 (rw,noatime,data=ordered) devtmpfs on /dev type devtmpfs (rw,relatime,size=372092k,nr_inodes=93023,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,relatime) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls) systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct) mqueue on /dev/mqueue type mqueue (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) configfs on /sys/kernel/config type configfs (rw,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime) /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) /dev/sda1 on /media/usb0 type vfat (rw,nodev,noexec,noatime,nodiratime,sync,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) /dev/sda1 on /home/pi/RetroPie type vfat (rw,nodev,noexec,noatime,nodiratime,sync,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro) tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=75288k,mode=700,uid=1000,gid=1000)
-
@kaichou Bingo! Look the
noexec
in the/home/pi/RetroPie
line:/dev/sda1 on /home/pi/RetroPie type vfat (rw,nodev,
noexec
,noatime,nodiratime,sync,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
-
Wow! I've learned something new! Ok, I see that it says
errors=remount-ro
, how do I fix that? After some quick Googling, would this be the correct method?sudo umount /home/pie/RetroPie sudo umount /media/usb0 sudo mount -o remount, rw /dev/sda1 /media/usb0 sudo mount -o remount, rw /dev/sda1 /home/pie/RetroPie
Thanks!
-
@kaichou Ouch! Now you screwed me up! :-) I don't know every detail of the mount command, sorry. But why do you think the
errors=remount-ro
option is a bad thing?You can look at the mount man page (command
man mount
) the meaning of this option:- errors={continue|remount-ro|panic}
Define the behavior when an error is encountered. (Either
ignore errors and just mark the filesystem erroneous and
continue, or remount the filesystem read-only, or panic and halt
the system.) The default is set in the filesystem superblock,
and can be changed using tune2fs(8).
- errors={continue|remount-ro|panic}
-
I assumed it was a problem because it was marked under Errors. ;) Figured it needed to be fixed. Plus I'm just using this as a learning opportunity. When I have a moment (when kids aren't playing on it), I'll try remounting to see what happens.
Thanks!
-
@kaichou said in Execute file from ROM folder = Permission denied:
I assumed it was a problem because it was marked under Errors. ;) Figured it needed to be fixed.
It's not an actual error, it's just an option saying what mount should do when an error is encountered.
-
DOH! Now I get it. Ok, so the
noexec
has probably been set by RetroPie; probably something to do with protecting the USB mount process. I don't have to run my scripts from this folder, I can adjust the script to run elsewhere; I was just so confused at being denied. Glad I understand it now, and I'll leave this alone for now.Thanks for your help Meleu!
As an aside, I've done some editing to BOBdotEXE's Google Drive Backup Script. Added support for PSP and DreamCast (still to be tested, but it at least backs-up the files). I'm now working on comparing the MD5 hashes of the backups so that I only keep backups that have new data in them. I'm not that great at scripting, but I'll eventually share what I come up with.
-
Sorry to reopen an old thread, but I believe I am experiencing the exact same issue.
I recently switched my RetroPie setup to run rom files direct from a USB drive using the automatic mount (easy) method here - https://retropie.org.uk/docs/Running-ROMs-from-a-USB-drive/.
Most things seem to be working fine, however when trying to launch the grim-win.sh (Grim Fandango using ResidualVM) script it will give a Permission Denied error in the runcommand.log. I checked everything is set up correctly in terms of user and permissions. I also experiencing the same thing when trying to launch .sh scripts from roms/lr-multi-bomberman (the game made by @alexis-puska (https://github.com/alexis-puska/lr-multi-bomberman). This was all working fine before switching to USB drive mount.
Checking cat /etc/fstab I can't see any reference to media or USB drives, and checking "mount" I can see I have noexec in the /home/pi/RetroPie line:
/dev/sda1 on /home/pi/RetroPie type vfat (rw,nodev,noexec,noatime,nodiratime,sync,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)Details:
Pi Model or other hardware: Pi 3
Power Supply used: 5V 2.5A mains adaptor
RetroPie Version Used: 4.2 img updated to script to 4.2.5
Built From: Build from img on RetroPie website.
USB Devices connected: 255GB Hyper X-Savage USB drive, Rapoo T-Series wireless keyboard/mouse
Controller used: PS3Is there a way around this? Would going through the Manual method resolve this issue?
Any help greatly appreciated!
Thanks very much.
-
@sonicsheppard You can remove the noexec flag by editing
/etc/usbmount/usbmount.conf
and removing thenoexec
parameter. Save and reboot.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.