what's the best practice to do in order for me to edit the files under /var/www directory, without having to login my root password all the time? ...because I can't edit the scripts at all, undless i am at sudo -i mode
|
feedback
|
|
Add the user you are using to the Apache or equivalent group which owns the file. If such a group does not exist create one. | |||||||
feedback
|
|
Here are the commands you need. Adding a user to a user group:
But, I'm not a fan of having a user with privileges other than root. I think its simple enough to just sudo commands. To edit a file, or do anything as root, without logging in simply do the following:
That will keep you as your user, but allow you to edit that file. Here's a link to everything you need to know about users, and groups. https://help.ubuntu.com/8.04/serverguide/C/user-management.html | |||
|
feedback
|