LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   chmod -R 775 /root (https://www.linuxquestions.org/questions/linux-newbie-8/chmod-r-775-root-729646/)

Raakh 05-31-2009 06:33 AM

chmod -R 775 /root
 
Hi,

I was usually using:
chmod -R 775 /path_to_directory
chown -R root:wheel /path_to_directory

to access the specific directory from wheel user but unfortunately I ran the following command and now unable to access root even the password is correct chmod -R 775 /root

Kindly advise

Thanks & best regards

Simon Bridge 05-31-2009 06:53 AM

You changed the entire content of /root, including /root to permisssions rwxrwxr-x ... but from the roregoing you've already done this some other places too? Not sure what you mean by "access root". Which distribution is this? How are you trying to access root? (log in as root user? or do you mean that when you run the command, the system won't let you?)

Hopefully you have just realized that this was a very silly thing to do: those permissions are there for a reason. You could have just given everyone in the wheel group sudo access.

Raakh 05-31-2009 07:03 AM

I 100% realized that this was my silly act and now I really disappointed from my own hands

I was accessing root from wheel user as direct ssh to root was disabled from the beginning

This is centOS Enterprise linux 5.x and when am trying to access root from wheel user then:
-bash-3.1$ su -l
Password:
su: incorrect password


Thanks for reply

synss 05-31-2009 07:07 AM

If you have some administration to do through ssh, you should ssh using your normal user and use su/sudo on the remote machine, very much like you (hopefully) do with physical access.

Moreover 775 makes everything executable. You do not want that. I do not get why having 775 would prevent you to log in, however. Are you sure you did not do anything else, which broke su?

Raakh 05-31-2009 07:26 AM

Quote:

Originally Posted by synss (Post 3558094)
If you have some administration to do through ssh, you should ssh using your normal user and use su/sudo on the remote machine, very much like you (hopefully) do with physical access.

Moreover 775 makes everything executable. You do not want that. I do not get why having 775 would prevent you to log in, however. Are you sure you did not do anything else, which broke su?

before this I did the same for /usr/lib/oracle/xe as when I restarted the oracle then it was throwing error:
ORA-10997: another startup/shutdown operation of this instance inprogress
ORA-09967: unable to create or open lock file
Linux Error: 30: Read-only file system

and the whole system became down. This instance of oracle is running one very important website and I became nervous so immediately I did:
chmod -R 775 /usr/lib/oracle/xe and then tried that started oracle instance and website became up again

then I did mistake that was not having any reason to do same for /root

anyhow is there anything to restore it in yesterday date/time like windows or rollback process like oracle?

Thanks again & best regards

Raakh 05-31-2009 08:11 AM

I get access from main server to my this vps with the same previous password:
Code:

[root@ltd02 ~]# su - 100vm
Logging into Xen Virtual machine 100.vm, Press Ctrl-] to Quit. Press a couple of Enters to start.

sh-3.1#

Can I do anything from main server with this vps to bring up my root access?

Thanks & best regards

chrism01 05-31-2009 06:23 PM

As you've mentioned its Centos, use this: http://www.cyberciti.biz/tips/reset-...ermission.html

Simon Bridge 06-01-2009 01:21 AM

Quote:

I was accessing root from wheel user as direct ssh to root was disabled from the beginning
Direct ssh access to root is disabled for a reason. The devs are trying to stop you doing something even more silly. Work out what tasks are needed and create a lesser user to handle them, and only them.

You only get a rollback if you have set it up to save the state of the system beforehand.

The cyberciti site looks promising - though I usually distrust anything .biz ... though I imagine that you'd need root access for this to work. Which will mean you have to do it at the physical machine, probably from a rescue terminal. I sure hope you are the sysadmin...


All times are GMT -5. The time now is 09:26 PM.