EvilZone

General Tech => Operating System => : th3g00n January 10, 2013, 01:25:28 AM

: [HELP] Restore default file permissions
: th3g00n January 10, 2013, 01:25:28 AM
A while ago I accidentally removed read & write permissions from my home folder. I couldn't run openbox and was running on virtual terminals(tty1 - tty6) for days. I finally fixed it and I could finally login to an openbox session. After that experience i started noticing some strange things; i couldn't run many commands from the openbox terminal and my virtual terminal.

I tried to fix the problem by adding /sbin to path. It works for the openbox terminal but not from the virtual terminal. Nothing works in the virtual terminal(e.g ifconfig, shutdown, reboot, iwconfig...). I also noticed that my personal most of my *.c files are now executables.

Is there a way to recursively restore all the file permissions to default or some kinda fix? I've been searching for a solution so i figured i could at least post here(still searching though).
 
 
: Re: [HELP] Restore default file permissions
: proxx January 10, 2013, 05:10:09 AM
Debian by default doesnt alow those actions to regular users.
Its one of the reasons debian is more secure than a lot of other distros.
You should probably use sudo.
: Re: [HELP] Restore default file permissions
: zWaR January 10, 2013, 11:51:05 PM
This will recursively set the permissions to the defined value:
:
# set rw to owner and group
chmod -R 660 ./*

Check if the files in /usr/bin and /usr/sbin have the x bit set.

If some tools or commands don't work use the command 'which'. It's result will tell you where the executable resides, so you can check permissions. If it does not return anything it may be the path issue.

Hope you'll rescue the system!