User executing script: bad interpreter: Permission denied
Trying to understand the fstab on one of my machines due to the following:
I'm trying to execute a shell script with a standard user called user1, the script is in his /home dir and he has full permissions but I get this error when excecuting. /bin/sh: bad interpreter: Permission denied -------- Apparently this has to do with my fstab??? https://www.redhat.com/archives/fedo.../msg04440.html Anyway this is the fstab file, I found an OK guide here: http://www.tuxfiles.org/linuxhelp/fstab.html But it doesnt' really answer my question and I still dunno why I can't have this user execute a script, maybe this doesn't have anythign to do with my fstab at all? Running FC2 btw. Code:
|
I wouldnt think this would have anything to do with your fstab. What does the script suppose to do? And what are the permissions and owner,group set to on it
|
It's a dedicated game server for BF2.
I've installed it fine on a local system and all works well if I do it all as root, however I prefer not t do run this stuff as root on the server connected to the net. Therefore my intention was to go through the process using a specific user and then use that particular user to stop and start the game server, if it were ever compromised at least this process wouldn't run as root. I'm also installing the files in this user's /home dir. Maybe I can achieve this result in a better way, maybe I shoudl run the install as root still and then change all the perms and have this user still execute it? |
newbee here: Is ist not that your script does not have the executable
flag set for user1 (same comment as Zero-effect) what does ls -l name_of_script give you? |
Ta but script is chmodded 755, otherwise I would get a different error.
Also just foudn that I get the same error as root on this particular machine, so it's not related to using user1 which means I'm really at a loss here :/ |
It is probably because the lines in your script end with CR+LF (like DOS text files) instead of LF (which is standard for Unix text files).
Yves. |
If that's the case, couldit still be interpreted fine on linux version and not on another? Is this a setting I can change/fix?
In my case it works on FC3 but not on an FC2 install. |
I once had this problem, but it only occured when I started my script as root. The reason I found was, that (after changing to root with su) /bin/sh was not in root's path.
It's not very probable that you have the same problem, but you might check if /bin/sh is in your user's path. :twocents: |
All times are GMT -5. The time now is 10:04 PM. |