I made a bad mistake in /var

I used chown -Rf apache:apache ./ in /var/ by accident can some one please give me the output of ls -l in ./var

[root@webserver var]# ls -l
total 72
drwxr-xr-x. 13 root   root   4096 Jul 11 02:49 cache
drwxr-xr-x.  4 root   root   4096 Jul 10 20:15 db
drwxr-xr-x.  3 root   root   4096 Jul 10 19:11 empty
drwxr-xr-x.  3 ftp    ftp    4096 Jul 10 20:15 ftp
drwxr-xr-x.  2 root   root   4096 Sep 23  2011 games
drwxr-xr-x. 45 root   root   4096 Jul 14 03:28 lib
drwxr-xr-x.  2 root   root   4096 Sep 23  2011 local
drwxrwxr-x.  5 root   root   4096 Jul 14 03:28 lock
drwxr-xr-x. 20 root   root   4096 Jul 13 01:59 log
lrwxrwxrwx.  1 root   root     10 Jul 10 19:10 mail -> spool/mail
drwxr-xr-x.  2 root   root   4096 Sep 23  2011 nis
drwxr-xr-x.  2 root   root   4096 Jul 12 22:46 nmbd
drwxr-xr-x.  2 root   root   4096 Sep 23  2011 opt
drwxr-xr-x.  2 root   root   4096 Sep 23  2011 preserve
drwxr-xr-x. 35 root   root   4096 Jul 14 15:42 run
drwxr-xr-x. 14 root   root   4096 Jul 13 01:58 spool
drwxrwxrwt.  3 root   root   4096 Jul 14 18:41 tmp
drwxr-xr-x. 12 apache apache 4096 Jul 12 00:12 www
drwxr-xr-x.  2 root   root   4096 Sep 23  2011 yp

I would really appreciate it

Here is what I have.

total 68
drwxr-xr-x. 14 root root 4096 Jun 29 18:00 cache
drwxr-xr-x. 4 root root 4096 Jun 22 14:48 db
drwxr-xr-x. 3 root root 4096 Jun 22 14:17 empty
drwxr-xr-x. 2 root root 4096 Sep 23 2011 games
drwxr-xr-x. 34 root root 4096 Jul 14 03:11 lib
drwxr-xr-x. 2 root root 4096 Sep 23 2011 local
drwxrwxr-x. 5 root lock 4096 Jul 14 03:11 lock
drwxr-xr-x. 13 root root 4096 Jul 14 03:11 log
lrwxrwxrwx. 1 root root 10 Jun 22 14:15 mail -> spool/mail
drwxr-xr-x. 2 root root 4096 Sep 23 2011 nis
drwxr-xr-x. 2 root root 4096 Jul 11 16:13 nmbd
drwxr-xr-x. 2 root root 4096 Sep 23 2011 opt
-rw-r–r-- 1 root root 0 Jul 14 18:22 output.txt
drwxr-xr-x. 2 root root 4096 Sep 23 2011 preserve
drwxr-xr-x. 26 root root 4096 Jul 11 16:13 run
drwxr-xr-x. 12 root root 4096 Jun 22 14:50 spool
drwxrwxrwt. 2 root root 4096 Jul 11 15:19 tmp
drwxr-xr-x. 6 root root 4096 Mar 29 06:43 www
drwxr-xr-x. 2 root root 4096 Sep 23 2011 yp

1 Like

yea i am basically at the point of restarting every thing anyway i think i fudged up /var/lib files too… so yea… not a good idea to do chmod apache:apache -Rf /var/ oops…

You may also ask the rpm command:

rpm -Va

At least it can restore the original attributes for files and directories installed by packages. See the --setugids and --setperms options; refer to rpm manpage for details!

1 Like

do you got time to walk me through setting up my beta installation? I can’t get it to lach onto my special gateway actually i can’t get it to static the ip and looking for where the file is that i need to edit along with the dns-nameservers

Usually, when you mess up really bad with file permissions and owners, the quickest path is reinstall. :frowning:

1 Like

Yea i tried a reinstall with the beta software and i just can’t get it to work for me no matter what i do…

Some sort of weird networking problem going on… I can’t even get it to set my custom gateways or anything only access is through local… I go to add the customized gateways and it does nothing…

Does anyone know how to turn off this ipv6 its starting to make it a priority and in my case i can’t do it… not yet…

Take a look at this: https://wiki.centos.org/FAQ/CentOS7#head-8984faf811faccca74c7bcdd74de7467f2fcd8ee

2 Likes

I can’t put enough likes to make it justice thanks a bunch!!!

2 Likes