Author Topic: [HELP] Restore default file permissions  (Read 947 times)

0 Members and 1 Guest are viewing this topic.

th3g00n

  • Guest
[HELP] Restore default file permissions
« on: 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).
 
 
« Last Edit: January 10, 2013, 01:26:55 am by th3g00n »

Offline proxx

  • Avatarception
  • Global Moderator
  • Titan
  • *
  • Posts: 2803
  • Cookies: 256
  • ФФФ
    • View Profile
Re: [HELP] Restore default file permissions
« Reply #1 on: 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.
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage

Offline zWaR

  • Serf
  • *
  • Posts: 32
  • Cookies: 7
    • View Profile
Re: [HELP] Restore default file permissions
« Reply #2 on: January 10, 2013, 11:51:05 pm »
This will recursively set the permissions to the defined value:
Code: [Select]
# 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!
« Last Edit: January 10, 2013, 11:55:51 pm by zWaR »