PDA

View Full Version : ' chmod 755 /* ' -- Help Please


gokhanweb
11-01-2005, 04:45 PM
Hi,
i did a great mistake.
i wrote chmod 755 /* .
after i wrote chmod 777 /tmp .
but i am in the a great security risk.
what can i do.

thanks.

jlasman
11-01-2005, 05:11 PM
You'll have to, one-by-one, change the permissions back to what they need to be.

If you post the output of:

ls -ald /*

one of us can probably help you.

Jeff

gokhanweb
11-01-2005, 05:44 PM
output of ls -ald /* is this:


[root@server1 /]# ls -ald /*
-rwxr-xr-x 1 root root 15360 Nov 1 23:12 /aquota.group
-rwxr-xr-x 1 root root 13312 Nov 2 00:13 /aquota.user
drwxr-xr-x 3 root root 4096 Oct 31 23:23 /backup
drwxr-xr-x 2 root root 4096 Nov 1 04:04 /bin
drwxr-xr-x 4 root root 1024 Oct 18 14:12 /boot
drwxr-xr-x 8 root root 4400 Nov 1 21:42 /dev
drwxr-xr-x 57 root root 4096 Nov 1 21:53 /etc
drwxr-xr-x 24 root root 4096 Oct 31 20:07 /home
drwxr-xr-x 2 root root 4096 Feb 22 2005 /initrd
drwxr-xr-x 10 root root 4096 Nov 1 04:04 /lib
drwxr-xr-x 2 root root 16384 Oct 18 14:05 /lost+found
drwxr-xr-x 2 root root 4096 Feb 22 2005 /media
drwxr-xr-x 2 root root 4096 Feb 22 2005 /mnt
drwxr-xr-x 2 root root 4096 Feb 22 2005 /opt
dr-xr-xr-x 123 root root 0 Nov 1 21:40 /proc
-rwxr-xr-x 1 root root 787 Sep 12 18:47 /rhgeneric.sh
drwxr-xr-x 9 root root 4096 Nov 1 03:50 /root
drwxr-xr-x 2 root root 4096 Nov 1 04:04 /sbin
drwxr-xr-x 1 root root 0 Nov 1 21:40 /selinux
drwxr-xr-x 2 root root 4096 Feb 22 2005 /srv
drwxr-xr-x 9 root root 0 Nov 1 21:40 /sys
drwxrwxrwx 3 root root 12288 Nov 2 00:36 /tmp
drwxr-xr-x 15 root root 4096 Oct 19 07:22 /usr
drwxr-xr-x 19 root root 4096 Oct 19 07:20 /var



sorry, what is the one-by-one?i can not understand.

thanks for help,

gokhanweb
11-01-2005, 05:45 PM
My OS is CentOS 4 and i am using DirectAdmin 1.25.4.
Thanks,

hostpc.com
11-01-2005, 07:33 PM
Have you tried running the set_permissions.sh script in /usr/local/directadmin/scripts ?

gokhanweb
11-02-2005, 03:48 AM
yes i tried.but set_permissions script does not configure permissions of / folder.after set_permissions script, output of ls -ald /* :

drwxr-xr-x 23 root root 4096 Nov 1 21:40 .
drwxr-xr-x 23 root root 4096 Nov 1 21:40 ..
-rwxr-xr-x 1 root root 15360 Nov 2 10:43 aquota.group
-rwxr-xr-x 1 root root 13312 Nov 2 10:30 aquota.user
-rw-r--r-- 1 root root 0 Nov 1 21:40 .autofsck
drwxr-xr-x 3 root root 4096 Oct 31 23:23 backup
-rw------- 1 root root 484 Nov 1 21:12 .bash_history
drwxr-xr-x 2 root root 4096 Nov 1 04:04 bin
drwxr-xr-x 4 root root 1024 Oct 18 14:12 boot
drwxr-xr-x 8 root root 4400 Nov 1 21:42 dev
drwxr-xr-x 57 root root 4096 Nov 1 21:53 etc
drwxr-xr-x 24 root root 4096 Oct 31 20:07 home
-rw-r--r-- 1 root root 0 Nov 1 19:20 .imap
drwxr-xr-x 2 root root 4096 Feb 22 2005 initrd
drwxr-xr-x 10 root root 4096 Nov 1 04:04 lib
drwxr-xr-x 2 root root 16384 Oct 18 14:05 lost+found
drwxr-xr-x 2 root root 4096 Feb 22 2005 media
drwxr-xr-x 2 root root 4096 Feb 22 2005 mnt
drwxr-xr-x 2 root root 4096 Feb 22 2005 opt
dr-xr-xr-x 122 root root 0 Nov 1 21:40 proc
-rwxr-xr-x 1 root root 787 Sep 12 18:47 rhgeneric.sh
drwxr-xr-x 9 root root 4096 Nov 1 03:50 root
drwxr-xr-x 2 root root 4096 Nov 1 04:04 sbin
drwxr-xr-x 1 root root 0 Nov 1 21:40 selinux
drwxr-xr-x 2 root root 4096 Feb 22 2005 srv
drwxr-xr-x 9 root root 0 Nov 1 21:40 sys
drwxrwxrwx 3 root root 12288 Nov 2 10:43 tmp
drwxr-xr-x 15 root root 4096 Oct 19 07:22 usr
drwxr-xr-x 19 root root 4096 Oct 19 07:20 var


thanks for reply,

gokhanweb
11-02-2005, 03:28 PM
Sorry,
can someone help me please?
i need to help.

jlasman
11-02-2005, 03:38 PM
I can only give you permissions for what I've got.

Here's the list from one of my DA servers running on CentOS 3:
[jlasman@host /]$ ls -ald *
-rw------- 1 root root 9216 Nov 1 11:50 aquota.group
-rw------- 1 root root 10240 Oct 30 05:05 aquota.user
drwxr-xr-x 2 root root 4096 Jul 6 2004 bin
drwxr-xr-x 3 root root 4096 Jul 6 2004 boot
drwxr-xr-x 22 root root 118784 Sep 1 00:52 dev
drwxr-xr-x 48 root root 4096 Nov 2 00:11 etc
drwx--x--x 68 root root 4096 Nov 1 16:33 home
drwxr-xr-x 2 root root 4096 Dec 13 2003 initrd
drwxr-xr-x 11 root root 4096 Jul 6 2004 lib
drwx------ 2 root root 16384 Jul 6 2004 lost+found
drwxr-xr-x 2 root root 4096 Dec 11 2003 misc
drwxr-xr-x 4 root root 4096 Jul 6 2004 mnt
drwxr-xr-x 2 root root 4096 Dec 13 2003 opt
dr-xr-xr-x 145 root root 0 Sep 1 00:51 proc
drwxr-x--- 7 root root 4096 Nov 1 17:12 root
drwxr-xr-x 2 root root 8192 Jul 6 2004 sbin
drwxrwxrwt 9 root root 57344 Nov 2 14:33 tmp
drwxr-xr-x 17 root root 4096 Jul 9 2004 usr
drwxr-xr-x 20 root root 4096 Jul 9 2004 var
[jlasman@host /]$
These should work for you. I don't know about the other directories, since I don't have them on the server I'm checking.

Jeff

gokhanweb
11-02-2005, 03:44 PM
Thanks jlasman.