noexec mount of sdcard [not relevant]
I have a btrfs formatted sdcard in my handset, which I realized is mounted noexec. I'd like to execute some scripts there, so I need exec.
I would expect that removing the mount-option "users" (which boils down to noexec,nosuid,nodev) in /usr/sbin/mount-sd.sh would remedy the problem.
This is however not the case, the sdcard is still mounted noexec after a reboot. As the script is the singulary spot where the sdcard-mounting is done, I have no idea where this restriction comes from. Is it some kind of btrfs subvolume inheritance issue? Any other hints?
Thanks in advance.
for scripts you technically don't need exec. You just can't use the "./script" syntax and have to use "sh script.sh" or "python script.py"
slaveriq ( 2014-07-17 09:22:07 +0200 )editYou're mixing apples with peas here. You first example is wrong. Your just giving a relative path instead of an absolute one (maybe also implicitely specified by the PATH environment). The binary must still be 700 for this to work.
Your second suggestion is true, as it calls the interpreter directly instead of determining by the shebang syntax.
Nevertheless, the question is rather where the noexec stems from, as it's not explicitely specified anywhere for this mountpoint.
marsch ( 2014-07-17 11:45:30 +0200 )editWell that was the point. You can't run binaries from it but you can execute your scripts with the help of the interpreter in question. I added it as a comment since it might help you getting your stuff done. It is in no way an answer to where the noexec flag comes from ;)
So no i was not mixing apples and peas ;)
slaveriq ( 2014-07-17 13:34:21 +0200 )editYou can't run a binary on a noexec mount by just calling it with a relative path, as you're still calling the interpreter implicitely. It's never been different.
marsch ( 2014-07-17 22:43:49 +0200 )editYes that is why i said that you CAN'T run it with "./script" please re read my initial comment.
slaveriq ( 2014-07-17 23:10:23 +0200 )edit