-
Categories
-
Tags/Keywords
blog.bigsmoke.us CLI X WLB07051 Screen zimbra Gentoo PHP samba bash Ruby mod_rewrite Family nutrition Windows SSH Subversion XTerm plugin Firefox svn MySQL Apache postfix shell Linux van der Molen RAID MediaWiki T61 HTTP RuG DNS HTML Debian CSS metabolism VIM WWW xen smb ssl Ubuntu WordPress Javascript -
Recent Posts
-
Recent Comments
Tag: setuid
Making a shell-script run with setuid root
If you want to run a process with root privileges that you can invoke as a less unprivileged user, you can make the program setuid root. This can be very useful, for example, when you want a PHP or CGI script to call a backup process, or to create a new site or irrevocably delete you whole system. The latter example points to a serious security problem: if anyone can figure out a way to make your program do something you don't want, you're screwed, because you just gave them root privileges to wreak maximum havoc. That's why, normally, scripts (anything executed by an interpreter by the kernel because of a shebang) won't get elevated privileges when you set their setuid bit.
Read More »