Hi
I am using centOS on Oracle VMWare.
Earlier port forwarding was working fine.
2 days back I gave chmod 777 * on root.
Yesterday I restarted my machine and tried working from my local via port forwarding.
It is showing this error:
Network error: Connection refused
What should I do to restore it? Is this some firewall issue?
It would take time for me to reinstall. Is there any other option?
Regards
Arshdeep
Port forwarding not working
Re: Port forwarding not working
ITYM VirtualBox not VMWare.I am using centOS on Oracle VMWare.
Yuck, that was a stupid thing to do. Your first step to recovering this, assuming that you can logon at all, is to run2 days back I gave chmod 777 * on root.
for p in $(rpm -qa); do rpm --setperms $p; rpm --setugids $p; done
That does a loop over all installed packages and tells rpm to set the permissions and group ownership back to what is specified in the package spec.
However, due to a bug in rpm, that does cause other problems so once that is complete you need to use rpm -Va to get a list of all files that do not match the way they are defined in the rpm. Any files that are listed as not matching "capabilities" will then need their owning packages yum reinstall'ed to correct them. For example. if you run rpm --setugids iputils then it removes the capabilities from /usr/bin/ping and /usr/sbin/{arping,clockdiff} and an rpm -V iputils will list those like so:
Code: Select all
[root@centos7 ~]# rpm -V iputils
........P /usr/bin/ping
........P /usr/sbin/arping
........P /usr/sbin/clockdiff
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke