My understanding of rc.local
, based on a quick Google search, is that I can put some bash in it which will be run at the beginning of [something] (what, user login, system start up?).
The rc.local
in my Ubuntu 12.04.2 server is owned by my user, orokusaki
, vs being owned by root
. Because it's in /etc
, I'm guessing it's more of a global thing vs a user-specific thing. Is this true? If so, why did Ubuntu create it with my orokusaki
user, but then put it in etc
? Should I chown root:root /etc/rc.local
to fix it, or should I move it into my home directory?
On Ubuntu 12.04, your rc.local should be owned by root. It's run by root, on startup.
You can
sudo -u <user> <command>
to run things as another user in rc.local, but I admit that in nearly every single case of using rc.local I've come across, I've found it far simpler to use Startup Programs instead.I suppose your mileage may vary. I'm afraid I don't know why your rc.local is owned by your user.