Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Well guys...i've made a big mistake.I've changed accidentally the permission of the root folder (not /root,but / )
Since then,all my applications and servers are messed out.What i can do to change it back without reinstalling the OS.
Thanks.
How exactly did you change it? Recursively or not? Do you have the command you used? If only one or two files are changed, you can restore it. If it was done recursively, there's probably no way to change it back.
Recursively...i used chmod -R 777 /some-dir..and after that i wanted to erase it..and i accidentally hit enter when the pointer erased some-dir. :|
After i noticed,i wanted to change it back...and used 666,but i did much more damage than the first time :|
Isn't there a program that checks all the vital files permissions,or something like that?
Recursively...i used chmod -R 777 /some-dir..and after that i wanted to erase it..and i accidentally hit enter when the pointer erased some-dir. :|
After i noticed,i wanted to change it back...and used 666,but i did much more damage than the first time :|
Isn't there a program that checks all the vital files permissions,or something like that?
Sorry, your best bet is a reinstall. I don't think such extensive damage is reparable, and even if it is, reinstalling will be much faster.
I have OpenSUSE 11.There isn't any other option?I don't want to reinstall the OS.I have apache,mysql,ftp,and other servers,script and other stuff...and i don't want to do all the hard work of configuring all of them...
Depending on the distribution that statement may be false or true. Without knowing those details I think it's at least premature to say that.
If you say so. Which distributions can be easily repared after a total screw up of the root directory?
Quote:
Originally Posted by Legolas891
I have OpenSUSE 11.There isn't any other option?I don't want to reinstall the OS.I have apache,mysql,ftp,and other servers,script and other stuff...and i don't want to do all the hard work of configuring all of them...
You should, of course, save all you data as well as configuration files before reinstalling. Their content should not be affected.
The SuSE installer CD has a repair option which can fix problems. I don't use SuSE but the command 'rpm --setperms' (or 'rpm -qa | xargs rpm --setperms' or maybe 'rpm -a --setperms') should do the same. After you're done it can also verify packages which should be the equivalent of running 'rpm -qVva'. The only requirement for all of this is that the RPM database exists on the disk or on a backup medium.
Last edited by unSpawn; 07-08-2009 at 12:25 PM.
Reason: //commands
The SuSE installer CD has a repair option which can fix problems. I don't use SuSE but the command 'rpm --setperms' (or 'rpm -qa | xargs rpm --setperms' or maybe 'rpm -a --setperms') should do the same. After you're done it can also verify packages which should be the equivalent of running 'rpm -qVva'. The only requirement for all of this is that the RPM database exists on the disk or on a backup medium.
I've trided 'rpm -qa | xargs rpm --setperms' but it gaves me a lot of 'No such file or directory'
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572
Rep:
Maybe a security auditing program would help. Perhaps udate-test-security or yast2-security, if run, would be able to diagnose and fix the problems.
Actually, the YaST2 submenu 'Security' should, I think, be able to fix it. SuSE, back when I used it (8.2), had preset permissions settings in the /etc/ file (these files being permissions, permissions.easy, permissions.secure, and permissions.paranoid.) These settings could be accessed by YaST2 under the submenu 'Security'.
Last edited by mark_alfred; 07-09-2009 at 02:06 AM.
Reason: thinking back to the days when I used SuSE
Maybe a security auditing program would help. Perhaps udate-test-security or yast2-security, if run, would be able to diagnose and fix the problems.
Actually, the YaST2 submenu 'Security' should, I think, be able to fix it. SuSE, back when I used it (8.2), had preset permissions settings in the /etc/ file (these files being permissions, permissions.easy, permissions.secure, and permissions.paranoid.) These settings could be accessed by YaST2 under the submenu 'Security'.
Ok,i'll give it a try.But the problem is that the ssh server won't start...
L.E.-It's started..but it rejects my connection.
It says:
ssh_exchange_identification: Connection closed by remote host
And with -vv:
OpenSSH_5.1p1, OpenSSL 0.9.8g 19 Oct 2007
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to "ip" port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
ssh_exchange_identification: Connection closed by remote host
Last edited by Legolas891; 07-09-2009 at 03:29 AM.
Distribution: Ubuntu Linux 16.04, Debian 10, LineageOS 14.1
Posts: 1,572
Rep:
Do you need the ssh server to check YaST? Presumably YaST is on your local machine. Open the YaST control centre and click the "Security and Users" menu item. There might be something there to assist you, I would think.
Last edited by mark_alfred; 07-09-2009 at 03:36 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.