Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Serious chmod error
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
jamiethehutt
n00b
n00b


Joined: 04 Oct 2004
Posts: 66
Location: Scotland!

PostPosted: Sat Oct 09, 2004 10:45 pm    Post subject: Serious chmod error Reply with quote

I've got a box thats developed a serious problem with chmod, whenever I change any permission the affected file becomes unreadable by anyone other than root. And thats all that seems to be going wrong. I'm not sure when this problem appeared, it might well have been hanging around for quite some time.

As a user I can't read a modified file with any permissions, no matter how they were set (letters (chmod ug+rw) or numbers (chmod 660)) I've changed ownerships and still nothing. Even when I set permissions as 777. To try and solve this I've rebuilt both system and world thinking that it might be a library problem but all to no avail.

I found out it was broken when I did chmod -R 640 /home after finding folders with execute privileges (I must have made them in the past :?) and thought it would be good house keeping to remove execute privileges.

This is the second problem this box developed, the first was SSH just refusing to start (it had worked for months till one day it wouldn't come up, till I re-emerged it). The chmod problem might have appeared when SSH broke, I don't know.

I'm pretty stumped on what might be up so any help appreciated, if no solution is found in the next few days its a reinstall, and thats something I don't really have the time for at the moment...
_________________
"Someday, he thought, it'll be mandatory that we all sell the McDonald's hamburger as well as buy it; we'll sell it back and forth to each other forever from our living rooms. That way we won't even have to go outside." - A Scanner Darkly By PK Dick
Back to top
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Sat Oct 09, 2004 11:10 pm    Post subject: Reply with quote

Quote:
I found out it was broken when I did chmod -R 640 /home after finding folders with execute privileges


Sorry thats funny. execute permissions means that you can ``execute'' the directory ie cd into it. So by changing the permissions on these directories you made it impossible to cd into them. You need to go back and undo this. The best way is with find.

Code:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;



or a little dangerous:
Code:

chmod -R 755 *
find . -type f -exec chmod 644 {} \;


You should also go back into your home directory and in the .* files and folders and such make sure that there are no world readable files with things like your passwords.
Back to top
View user's profile Send private message
jamiethehutt
n00b
n00b


Joined: 04 Oct 2004
Posts: 66
Location: Scotland!

PostPosted: Sat Oct 09, 2004 11:29 pm    Post subject: Reply with quote

Quote:
Sorry thats funny. execute permissions means that you can ``execute'' the directory ie cd into it. So by changing the permissions on these directories you made it impossible to cd into them. You need to go back and undo this.


:D Well I'm pleased but feeling pretty stupid!

Whats realy odd is I can remember changing the permissions to 777 :? :? Must be going crazy...

Thanks so much!
_________________
"Someday, he thought, it'll be mandatory that we all sell the McDonald's hamburger as well as buy it; we'll sell it back and forth to each other forever from our living rooms. That way we won't even have to go outside." - A Scanner Darkly By PK Dick
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum