Can't modify files after adding new user

May 13, 2014 621 views
Hi I followed your guide, did all the steps https://www.digitalocean.com/community/articles/initial-server-setup-with-centos-6 But when I edit files in my root directory I get> permission denied I'm running CentOS 6 with Zpanel. Anyway I can revert back to normal root access.
1 Answer
Did you follow step four:

https://www.digitalocean.com/community/articles/initial-server-setup-with-centos-6#StepFour—RootPrivileges

If so, your user should be able to get root privileges by using "sudo" Simply prepend it to the command you want to run. For instance, if you wanted to edit the file "/etc/hosts" you'd use:


sudo nano /etc/hosts
by Etel Sverdlov
This tutorial covers how to login with root, how to change the root password, how to create a new user, how to give the new user root privileges, how to change the port, and how to disable root login in. This tutorial is written for Ubuntu. When you first create your server, this tutorial explains the first steps you need to take. This tutorial is made for CentOS.
Have another answer? Share your knowledge.