Tag Info

Hot answers tagged

6

You have to run the command using sudo. sudo /etc/my_script.sh Editing the suduoers file doesn't mean each invocation of the script runs as root, merely that they are permitted to do so if invoked correctly. Whether it makes any sense to put a shell script in /etc is a separate question.


2

Firstly, as dmourati said, you'd still need to invoke the script with sudo, not just run it. Second, you really shouldn't put scripts in /etc - especially not if those scripts are supposed to be run by the webserver. Thirdly, giving a user access to run a shell script as root pretty much equals giving them full root. It's far too easy to escape to the ...


1

Considering, that I was working on this issue for the past 2 weeks, after writing down the details of the problem in this question, I was finally able to fix it. It was actually an entry I made in the hosts file that caused this issue. Perhaps I was playing around a bit too much :-) Anyway, here is the issue line: 127.0.0.1 localhost.localdomain localhost ...



Only top voted, non community-wiki answers of a minimum length are eligible