chmod -R 777 in /usr Solaris 9 = Major Screwup


 
Thread Tools Search this Thread
Operating Systems Solaris chmod -R 777 in /usr Solaris 9 = Major Screwup
# 1  
Old 08-06-2008
chmod -R 777 in /usr Solaris 9 = Major Screwup

Hello Everyone:

One of our admins here accidently ran chmod -R 777 in the /usr folder on a V440 running Solaris 9. After that no one could run any command and could not login. I fixed most of the things by re-restricting some rights and applying the correct rights. Now there is a problem with the "su" command.

[discus/]/export/home0/usr/discus> su - root
Password:
su: Unable to join project "user.root"
[discus/]/export/home0/usr/discus>

-rwxr-xr-x 1 root sys 78 Apr 6 2002 project

Contents of project file from /etc
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::

Any help would be greatly appreciated.

- Tony
# 2  
Old 08-06-2008
/etc/project isn't supposed to be executable (should be 0644) but I wouldn't have thought that would actually cause your error...

Why not just recover the correct permissions from your backup's Table of Contents, then reapply them via a scripted chmod? That way you know you've got everything back the way it should be.
What's your backup software?

Alternatively, use another v440 sol9 build to provide you with the correct template, use the find command on the two systems and script a lookup to calculate the correct perms.

Let us know if you need a hand with these, it's a relatively straightforward problem and to debug each seperate issue one by one will have you busy for years - not to mention introducing questions about what caused it on every bug or issue you find on that box for ever more.

BTW, running chmod 0777 on anything is always avoidable, the only time you'll ever need 777 rights on a directory is when you'll also need the sticky bit set too.
Using a -R suggests that your admin was trying to solve a permissions problem by just making everything full rights; including execution rights which you never want on a data file (imagine if you accidentally ran it, you'd be piping random bytes of data at an interpretor, the kind of mess that could make is horrible).
Aside from the mistake over where to run it (that happens to everyone at some point, I've seen a recursive rm ran from /, I've had a chown -R go very wrong myself), I'd say you should be having a talk to them about security and safe practices.
# 3  
Old 08-06-2008
Did you restore su suid bit ?

Code:
$ ls -l /usr/bin/su
-r-sr-xr-x   1 root     sys        34780 févr.  9 01:50 /usr/bin/su

# 4  
Old 08-07-2008
Thank You

Thank you for the great replys. We fixed everything by restoring rights from backup. Everything is up an running except for the man pages. That I'll just rebuild, no big deal. By the way, our backup software is ARCServ.

Again, thanks for the great replys. All of you were a big help.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Only allowing chmod 777 for file upload folder

Hey everyone. I have 2 different linux servers (each one is through a different web hosting company). On both servers I have the exact same PHP file upload script that allows users to upload a file or image to the server (everything on both servers is identical). On server #1 the "attachments"... (5 Replies)
Discussion started by: Mr.Canuck
5 Replies

2. Windows & DOS: Issues & Discussions

chmod -R 777 * in cygwin

Hello, I use windows XP on a small server. Lately I downloaded a software (hydrological computation) which asked me to install as well the software ‘cygwin' (kind of linux in windows environment) and then to perform in cygwin window the command: ‘chmod -R 777 *' in order to give writings... (2 Replies)
Discussion started by: Cedalise
2 Replies

3. UNIX and Linux Applications

What is the difference between chmod in solaris and chmod in Linux?

i think it is the same in both... Iam i right? (1 Reply)
Discussion started by: sumaiya
1 Replies

4. Solaris

/usr/bin has been changed with 777 permission

Hello Guruz, Relay bad condition :mad: Some has changed the permission to 777 recursively for /usr/bin directory by mistake. Now all the permission looks to be 777 on /usr/bin Hence I am so many system related errors as 1 show below. When I am trying to change the password, I am getting... (5 Replies)
Discussion started by: bullz26
5 Replies

5. Cybersecurity

can another user 777 and existing 777 dirctory?

User usrA creates dirA directory and runs chmod 777 on the directory. Can usrB issue another 777 on dirA? It appears the answer is no even if the usrA and usrB are part of the same group. I know this is a rare scenario but I just ran across it and found out that usrB receives an error when... (4 Replies)
Discussion started by: zlek131
4 Replies

6. UNIX for Dummies Questions & Answers

chmod 777 * - oops

I can belive I really did this... chmod 777 /home :eek: I have my /home directory synced to another machine. Can anyone tell me how to get the permissions from back up server /home to production server /home It's important that I dont over write the files on the... (1 Reply)
Discussion started by: shunter63
1 Replies

7. UNIX for Dummies Questions & Answers

chmod 777 security risks?

Hello all, I did a considerable search of the forum and didn't find an answer so I'll ask it here. For clarity's sake I'll state that I know just enough about Unix to be Dangerous (I'm an old Clipper, VO, ASM programmer from the 80's.) I would like to install PHP driven CMS program to my... (6 Replies)
Discussion started by: Gary777
6 Replies

8. UNIX for Dummies Questions & Answers

Major differences between AIX, Solaris, HP-UX, Linux

Hi All, I want to know the OS level differences between AIX, Solaris, HP-UX, Linux Apart from the vendor, H/w and command differences, any other significant points. regards, guru Charan (9 Replies)
Discussion started by: gurukottur
9 Replies

9. UNIX for Dummies Questions & Answers

chmod 777 on all directories below...how do I do that using the "find" command?

I've got 100 directories that each have 2 directories with in them. Structered like this: /home/domains/domain1/ through to /home/domains/domain100/ and those 2 directories mentioned above are here: /home/domains/domain1/directory1/ /home/domains/domain1/directory2/ through to... (7 Replies)
Discussion started by: Neko
7 Replies
Login or Register to Ask a Question