What is the "correct" or most elegant solution when /tmp is mounted with noexec? #8686
-
I ran into a situation where my pyinstaller-frozen app (onefile mode) no longer worked after being rebuilt on a newer version/build of RHEL where /tmp is mounted with noexec. The cause is well-described in the docs (thank you for that). I need the app to be easily executable by any user so previously I just had the onefile executable in one of the directories in $PATH. Now, however, to get around the /tmp noexec issue, my solution is to instead put into a $PATH directory a bash script that looks something like:
And this works fine, but deploying this to a bunch of servers just got slightly more clumsy because of the need to distribute that bash script into one place and then the actual executable somewhere else. Is there a better solution? Should I instead set Any feedback appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Using |
Beta Was this translation helpful? Give feedback.
-
If RHEL is explicitly trying to block applications from executing temporary files then attempting to use onefile mode isn't going to work out cleanly. |
Beta Was this translation helpful? Give feedback.
-
Just marking this one answered. Thanks for the feedback . |
Beta Was this translation helpful? Give feedback.
Using
runtime-tmpdir
means that the path to temporary directory becomes hard-coded and impossible to change without a rebuild (and on POSIX systems, the path cannot contain environment variables). Whether you consider this a downside or an upside or are indifferent to it very much depends on your situation.