Basic Linux Questions for New Pyra Owners and Others


FelixNemis

Very Active Member
Joined
May 15, 2012
Messages
304
How do I set the executable permission bit for auto-mounted FAT32 SD cards? And no, I'm not looking to change the file system on the SD card, nor do I want to change this individually for every single one. This was a thing on the Pandora, so surely it can't be impossible, right?
I've been trying to figure this out as well. As far as I can tell the issue is fat SD cards are mounted by udisks2 with the "showexec" option which only gives executable permissions to files with .exe or .com or something dumb like that
following directions on here http://storaged.org/doc/udisks2-api/latest/mount_options.html but it didn't work last I tried it. created a /etc/udisks2/mount_options.conf file but it didn't seem to change the behavior

I might have just got something wrong though, hope this helps

edit: the option you want is "exec" instead of "showexec"
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
13,918
Location
Somewhere off the coast of the EU
According to the mount options for fat devices, the 'exec' option is not defined. Showexec is but only seems to do anything if you've already set the exec bit elsewhere, and like you say limits the option to .exe, .bat and .com files. I think the option you want to set is fmask which takes an octal value. If you're the only user on the system you want to set that to 0700 or 0500 if you want to make them read only. You can also set dmask, but I guess you're happy with directory handling, and umask which might apply to new files or I'm reading the docs wrong.
 

elvissteinjr

Very Active Member
Joined
Jun 19, 2010
Messages
754
Age
24
Location
Germany
Can you explain what you are trying to do, and what is failing ?
I want to execute applications from SD card which otherwise would have no issue running from that file system (Box86 stuff being primary target, but doesn't really matter). I want to be able to copy my own code over from a Windows PC, compile it straight on the SD card and run it, as I've done on the Pandora.
I won't deny it's about convenience and doing things the "proper" way would be avoiding this altogether, but it's been possible before, so I'd like to have this behavior back if it can be achieved.


As far as I can tell the issue is fat SD cards are mounted by udisks2 with the "showexec" option which only gives executable permissions to files with .exe or .com or something dumb like that
Indeed seems to be the case. Renaming elf binaries to end with .exe and the re-mounting actually makes them executable. That's quite the dirty workaround, mhm.
 

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
13,918
Location
Somewhere off the coast of the EU
I doubt anything you run under box86 actually needs the execute bits set. It's passed as an argument to the box86 executable, so as long as it's readable it should work.
 

docbroke

Banned
Joined
Feb 21, 2019
Messages
553
Age
39
Location
India
showexec option is specific for fat filesystem, however there is "exec" which is universal option. So how about trying to mount manually using exec option.
 
Top