tvilberg
Pogo-Squeeze permissions
January 24, 2013 08:30AM
I screwed up. I meant to change the permissions of a directory and instead issued the command chmod -R 777 * when at the "/" of the system. My bad.

So when I rebooted the SSH didn't work (permission problems, duh), but fortunately, I had installed webmin so I could still connect and get to a command line. There I straightened out SSH so I can now use a terminal and get to the machine using SSH.

Here is the problem. When I list the root directory, I get the following:

total 88

drwxrwxrwx 2 root root 4096 Jan 14 11:56 bin
drwxrwxrwx 2 root root 4096 Dec 31 1999 boot
drwxr-xr-x 13 root root 2540 Dec 31 1969 dev
drwxrwxrwx 61 root root 4096 Jan 21 04:24 etc
drwxrwxrwx 3 root root 4096 Jan 14 12:15 home
lrwxrwxrwx 1 root root 33 Dec 31 1999 initrd.img -> boot/initrd.img-2.6.32-5-kirkwood
drwxrwxrwx 9 root root 8192 Jan 14 20:29 lib
drwxrwxrwx 2 root root 16384 Dec 31 1999 lost+found
drwxrwxrwx 2 root root 4096 Dec 31 1999 media
drwxrwxrwx 2 root root 4096 Sep 23 17:01 mnt
drwxrwxrwx 2 root root 4096 Dec 31 1999 opt
dr-xr-xr-x 70 root root 0 Dec 31 1969 proc
drwxrwxrwx 4 root root 4096 Jan 14 18:09 root
drwxrwxrwx 2 root root 4096 Dec 31 1999 sbin
drwxrwxrwx 2 root root 4096 Jul 21 2010 selinux
drwxrwxrwx 3 root root 4096 Jan 14 17:27 srv
drwxr-xr-x 12 root root 0 Dec 31 1969 sys
drwxrwxrwt 3 root root 60 Jan 24 08:34 tmp
drwxrwxrwx 2 root root 4096 Jan 17 19:51 toss
drwxrwxrwx 10 root root 4096 Dec 31 1999 usr
drwxrwxrwx 15 root root 4096 Jan 14 19:20 var
lrwxrwxrwx 1 root root 30 Dec 31 1999 vmlinuz -> boot/vmlinuz-2.6.32-5-kirkwood
-rwxrwxrwx 1 root root 2219 Jan 14 11:53 webmin-setup.out

I need to know two things.

Firstly, is there any reason not to run the system this way? It is behind a firewall, never browses the web or gets email, only uses normal Debian Squeeze software sources. No one other than me will ever touch the machine. So, should I worry about trying to change the permissions back to what they should be? Or should I just run it like it is and take care not to ever plug it in outside of my personal network.

Secondly, assuming that I SHOULD repair the permissions, is the easiest way to just go back and reinstall Squeeze again. Or do I also have to change some firmware permissions to get back to where I started.

Sorry if this is a bit off-topic, but it IS a Debian question.
Re: Pogo-Squeeze permissions
January 24, 2013 06:35PM
One problem that I suspect you'll encounter is that, in all likelihood, you've lost any set-uid and set-gid bits which were set on your filesystem. Also (as you found out with ssh), some programs check and require tightened permissions to run. The Sendmail MTA is another one that is strict about permissions.

I remember once doing an "rm *" in /bin by mistake and the sinking feeling I felt when I saw the message: "rm: text file busy" (meaning, of course, the program couldn't remove itself because it was active).

Unfortunately, my advice would be to reload.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: