Restoring file and directory permissions on Centos 6.5, 64 bit using Live CD
I have a Centos 6.5 Live CD, 64 bit. I messed up my permissions on my Centos 6.5, 64 bit install. It seems the only realistic thing to do is to reinstall.
That would be hard. I restored most of the permissions using the commands: for u $(rpm -qa), do rpm --setugids $u; done and for p $(rpm -qa), do rpm --setperms $p; done As I said most permisiosns are now set correctly. Most, but not all. The system files and directories such as /usr/local/ /usr/bin still have far too open permissions. I want to set them back to their original permission values, but the above two command did not do that. Guess, I must reinstall. But do I? The Centos 6.5, 64 bit Live CD has all of those fle and directory permission values. So is there way to use the Live CD and copy them to the Centos install on my computer's hard drive automatically. I would rather not do it by hand : too tedious and error prone. There must be some way to do it automatically and save a lot of time. The alternative is to reinstall. I would rather not do that. Thanks in advance, Respectfully, jyunker |
Code:
stat -c%a /usr/bin /usr/local |
command output
Okay, what is this command? What am I trying to do here? I will send you the output when I run it.
Respectfully, jyunker |
The response when running
stat -c%a /usr/bin/ usr/local/ is 555 755 Is this what you need? Respectfully, jyunker |
Quote:
IMHO, attempting to fix permissions in any way other than a restore from backups or a reinstallation is playing with fire. You could end up with all kinds of security holes in your system. |
/usr/bin is 555 ?
is ok for the FOLDER there is also the SElinux context that might also need fixing the two commands in the first post will restore them -- mostly but NOT the folder the programs are in however for the JUST the /usr/bin Code:
su- Code:
dr-xr-xr-xsystem_u:object_r:bin_t:SystemLow Code:
755system_u:object_r:bin_t:SystemLow you will need to MANUALLY go through and check EVERYTHING reinstall 20 to 30 min. restore from known good back up 30 min. manually check everything A WEEK or so..... (or at least a few days of long hours ) |
Quote:
I guess I'd ask what Quote:
|
worrying about folders
I appreciate your quick response and I must tell you that you have given me some ideas.
I ran the commands as stated in the first post of this string, and it must have changed the programs permissions, becuase only folder names are now in that dark green rectangle on the computer screen that means they have far too liberal permissions. Thus I am assumimng that the programs permissions must be okay after I ran those two one-liners commands. That leaves only folders to worry about. This make the problem tractable. Am I correct on this, because it seems so from what you said? Thanks in advance. Any help appreciated. Respectfully, jyunker |
Quote:
It's hard to tell from here. We're using terminal commands and you are referencing some unknown graphical representation of "folder names". Can you elaborated on this dark green rectangle? Desktop Environment? File Manager? A green rectangle may just mean you have access to those directories and their contents? |
filename and directory names
Somewhere along the line when I was installing NVDIA drivers and toolkits, I must have changed too many files to very liberal permissions. The suggested result was to run the two commands shown at the start of this string.
I was warned the commands would take a long time to run this and they did. These commands did not get everything, but they got a lot. I ended up with some directories in a dark green rectangle and permissions like this drwxrwxrwx james james Vurtualbox VMS to get the dark green reactangle to go away, I changed permissions to drwxrwxr-x james james Vurtualbox VMS I was warned the this dark green triangle enclosing a directory name indicated that these directories have far too liberal/open permissions. I must change them or when my computer is scanned again by network security, I will be booted off the network. I then ran Code:
sudo yum reinstall filesystem This seemed to get some more directory permissions changed and I was very happy. All of the directories and files from Desktop and on were now just fine. However, directories closer to root - not so much. Many, but not all had their name enclosed in a green rectangle. Again, this signaled far too liberal permisisons. So I noted that no filenames only directories names were enclosed in a green rectangle. That is whre I must concentrate. I am now doing just that. As I said most have been corrected, but some have not. Again no filenames in dark green reactangle, only directory names. This indicated a much more tractable problem; there a far fewer directories than filenames. That is why I am only worrying about directories; it should be much easier. The statement by someone in this thread indicated that those two commands at the start of the thread chanage only filenames permissions. I believe the easier way to go is too change things back. A reinstall for me will take a long time-not 20-30 minutes. Respectfully, jyunker |
Quote:
nor is there a need to do so for the CUDA-SDK just WHAT instructions are you trying to fallow they sound like they are DESIGNED to KILL / FUBAR a operating system install -- like the 4chan ps4 BRICKING " bit of FUN" they had -- telling people to but the ps4 in a reboot cycle also BE AWARE !!!!!!!!! as a SECURITY measure SELinux will NOT !!!! let you login if the users HOME folder has the WRONG SE context and if the system files have the wrong SE context SELinux might even PREVENT the booting of the Operating system there was and is no need to change any folder or program permissions reinstall the OS is your BEST OPTION |
Quote:
Next time, you may wish to include omitted steps much earlier in your posts for assistance, instead of 10 posts later: Quote:
Code:
sh /path/to/NVIDIA-Linux-whatever.sh |
partial reinstall
Is there a way to do a reinstall of centos 6.5, 64 bit and avoid any and all parts of the network reinstall?
This is the only way that I dare do it. If I cannot is do that, is there some kind of piecemeal approach to reinstalling Centos? I just want to avoid at all costs the network connection reinstall. If I am tossed of the network (and I will be if I cannot do it either of these two ways) then it will take a 20-min for the software install and a week in filling out forms to get back on the network. At least a week. Please understand my problem. Respectfully, jyunker |
Quote:
IP/Subnet + Gateway? That is all that most installs need to get to the internet. |
reinstall linux and preserve network connections
Yes, exactly.
Is there way to do it? Any help appreciated. Thanks in advance. Respectfully, jyunker |
All times are GMT -5. The time now is 09:33 AM. |