LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-31-2009, 07:33 AM   #1
Raakh
Member
 
Registered: May 2007
Posts: 128

Rep: Reputation: 15
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
 
Old 05-31-2009, 07:53 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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.
 
Old 05-31-2009, 08:03 AM   #3
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
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
 
Old 05-31-2009, 08:07 AM   #4
synss
Member
 
Registered: Jul 2007
Location: Germany
Distribution: Debian, Gentoo, Mac OS X
Posts: 137

Rep: Reputation: 22
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?

Last edited by synss; 05-31-2009 at 08:10 AM.
 
Old 05-31-2009, 08:26 AM   #5
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by synss View Post
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
 
Old 05-31-2009, 09:11 AM   #6
Raakh
Member
 
Registered: May 2007
Posts: 128

Original Poster
Rep: Reputation: 15
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
 
Old 05-31-2009, 07:23 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,254

Rep: Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328Reputation: 2328
As you've mentioned its Centos, use this: http://www.cyberciti.biz/tips/reset-...ermission.html
 
Old 06-01-2009, 02:21 AM   #8
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache: difference between chmod 644 and chmod 666 and chmod 600 for output/txt/dat? frenchn00b Programming 6 04-22-2009 02:10 PM
Root cannot chmod a file srarcade Linux - Software 6 10-15-2007 09:09 PM
chmod 775 to only the directories and chmod 664 to only the files? apachenew Linux - Security 6 09-27-2007 04:26 PM
NFS Root setup - can't log in as root after CHMOD ? gallwapa Linux - General 1 04-02-2007 05:31 AM
can't chmod under root Kanaflloric Linux - Newbie 10 08-14-2004 12:06 AM


All times are GMT -5. The time now is 05:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration