User executing script: bad interpreter: Permission denied
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
--------
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.
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?
Distribution: Mandriva mostly, vector 5.1, tried many.Suse gone from HD because bad Novell/Zinblows agreement
Posts: 1,606
Rep:
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 :/
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,646
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.