You are not logged in.

#1 2009-01-17 00:11:20

szajskerl
Member
Registered: 2008-03-23
Posts: 13

default chmod permissions

I have a huge problem... I have proceeded by chance

chmod -R 0755 /*

now I would like to restore the defualt settings for each file... Do you know any script which would restore them?

Offline

#2 2009-01-17 00:26:02

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: default chmod permissions

lol why did you do that?


neutral

Offline

#3 2009-01-17 00:36:34

szajskerl
Member
Registered: 2008-03-23
Posts: 13

Re: default chmod permissions

it should have been for a subfolder in / yet I did not enter it by chance...

Offline

#4 2009-01-17 01:01:36

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: default chmod permissions

It's not a huge problem unless you have other users on your PC. All directories and stuff in the bin dirs should be like that.

So you can go folder by folder making sure everything is as it should be. You could run things like
chmod a-x $(find etc -type f)
chmod a-x $(find usr -name bin -prune -o -type f -print) (I can't see if that is correct syntax right now, read examples in man find)

And make things like /etc/shadow and /root/ world unreadable.

Offline

Board footer

Powered by FluxBB