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).