LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   restore chown default centos (https://www.linuxquestions.org/questions/linux-server-73/restore-chown-default-centos-933839/)

itdungpt 03-10-2012 11:17 PM

restore chown default centos
 
i use centos with cpanel

i was user chown -hR user:user /

then
chown -hR root.root /

server error.

please help me restore chown default centos

linoseros 03-11-2012 03:05 AM

as far as I know that's not possible. sorry

unSpawn 03-11-2012 05:39 AM

Quote:

Originally Posted by itdungpt (Post 4623808)
please help me restore chown default centos

Distributions using the RPM package manager can recover permission settings from the RPMDB running 'rpm' with the "--setperms --setugids" switches. The problem is you have to run the process as root user. If no root shell remains open or can be opened then you could check if you can alter a crontab that runs processes as root. If that doesn't work and you don't have Out of Bounds access then you probably have to ask your hosting company to restore a backup for you.


Quote:

Originally Posted by itdungpt (Post 4623808)
i use centos with cpanel (..) chown -hR root.root /

You realize now that root is omnipotent and that you should not run commands you don't understand the consequences of. Also be aware that being able to click buttons in a web-based management panel does not make you an admin. I strongly suggest you read some basic "Learning the Linux Command Line" tutorials and the standard documentation that Centos comes with to avoid fscking up like that again. You may think that it's all OK since it's your server but Linux is the networked OS. So what goes wrong with or behind your lines of defense may adversely affect others on the 'net as well.

Linux may be free to use but using it is not free of responsibilities.


All times are GMT -5. The time now is 07:55 AM.