Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.