SunQuest
           UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old September 4th, 2004, 11:33 AM
Boki's Avatar
Boki Boki is offline
A wanna-be guru of some sort
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2004
Location: Either online or offline
Posts: 624 Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 4 h 7 m 13 sec
Reputation Power: 13
Question chmod Question

Say u use chmod -R while logged in as root and remove the execute permission
from all commands. How could this be fixed?

Reply With Quote
  #2  
Old September 5th, 2004, 06:26 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,077 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 13 h 40 m 11 sec
Reputation Power: 8
i start playing unix 1979
no internet, no forums, no chance to get help or teachers
the only way: READ man pages, try it!
man chmod, that's what you need.
you could try: chmod -R a-x .
don't forget: directories need the 'x' permissions!
so it's a little complicated:
find . -type f|xargs chmod 555
or a shell-script.

Reply With Quote
  #3  
Old September 5th, 2004, 10:05 AM
Boki's Avatar
Boki Boki is offline
A wanna-be guru of some sort
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2004
Location: Either online or offline
Posts: 624 Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 4 h 7 m 13 sec
Reputation Power: 13
Yeah, well, I know that the man is supposed to be my best friend
I recently started learning UNIX System Administration and am worried that
I might acidentally mess up something, so I wanna know if something I could
mess up could be fixed and how.
That's why I posted this question.
Tnx for your help.

Reply With Quote
  #4  
Old September 5th, 2004, 05:52 PM
Perderabo Perderabo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 121 Perderabo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 m 54 sec
Reputation Power: 5
I hate to rain on your parade here, but about the only way to recover from something like that is to reload the OS, rebuild the filesystems, and reload the files from backup tapes. You need good backups to recover from disasters. This would be a disaster, so treat it that way.

Use the chmod command? How? It has no execute permission. Run a shell script? With what as an interpreter? The shells have no execute permission. Basicly, this box is not going to even be bootable. Being completely unable to run commands at all is simply a very big problem.

There are other approaches... You could try to boot from an install cd or something. But rebuilding a box from scratch is a skill you need. You should be good at it. And you should have current backups you trust. With most systems, I can install the os and start spinning backups tapes in less than 2 hours. The tapes will take time to read...how long depends on how much data. If you try to recover from this by booting an install cd, it will take longer than that just to get the box bootable. You will be mopping up the mess for days. And in the end you will probably wind up reinstalling anyway.

So with a disaster of this magnitude, my advice is to simply re-install.

Reply With Quote
  #5  
Old September 5th, 2004, 08:55 PM
Boki's Avatar
Boki Boki is offline
A wanna-be guru of some sort
Dev Shed Novice (500 - 999 posts)
 
Join Date: Sep 2004
Location: Either online or offline
Posts: 624 Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level)Boki User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 2 Days 4 h 7 m 13 sec
Reputation Power: 13
Yep, I figured it would be the simplest thing, but just wanted to make sure if there were some other options. As I said before, I just wanna make sure I can fix things I might mess up.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > chmod Question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway