![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| command to copy files with original ownership | need_help | UNIX for Advanced & Expert Users | 3 | 02-08-2008 04:46 PM |
| 100% ownership to files | Terrible | UNIX for Dummies Questions & Answers | 3 | 12-05-2006 10:40 AM |
| files ownership/permission problem | jop | Linux | 1 | 03-30-2006 12:31 PM |
| Files in work directory reverting to root ownership | canman | UNIX for Dummies Questions & Answers | 1 | 06-16-2005 08:24 AM |
| How do I change ownership of a directory and all of it's files. | mborin | UNIX for Dummies Questions & Answers | 1 | 02-25-2001 03:24 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
ownership of files
Hi,
While changing ownerships from the root on a server i'm managing, i typed chown -R username:users * and it changed all ownership to username. Can someone tell me if there is someway I can set things back the way they were before? I can't even su username from the root. Am I going to just have to go under username and change all the ownership back to root and then manually change the ones i want under username? How would I do that? Thank you scott |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Sorry to have to tell you this but there is no easy way
of backing out this sort of change. |
|
#3
|
|||
|
|||
|
Can you explain to me why i can't even su to my user name from root? Or if i wanted to change ownership to root how would i do that?
thanks |
|
#4
|
||||
|
||||
|
It would help to know what directory you were in at the time you entered that command...
As you have found out using any recursive function is very dangerous especially with the * option. They can be a deadly combination. Lucky for you, changing ownership is not as deadly as changing all the exe permissions to 444. which can be deadly. Basically, You need to check the ownership in /sbin, /usr/bin and /usr/sbin. And maybe /etc as well. This will get you back on your feet. I would hope You have a backup of some kind if you need it to restore from. On my box /usr files are all owned by root:sys Under /usr/sbin most all of them are owned by bin:bin Under /usr/bin most all are owned by bin:bin The su command is under /usr/bin/su.
__________________
My brain is your brain |
|
#5
|
||||
|
||||
|
su generally will have the setuid bit set. Thus:
-r-sr-xr-x 1 root sys 17568 Nov 5 2001 /usr/bin/su # chown root:sys /usr/bin/su # chmod 4755 /usr/bin/su Cheers, Keith |
||||
| Google The UNIX and Linux Forums |