Barak Korren wrote:
I've recently attempted to move my /var directory form the root filesystem to a new filesystem I created on my hardrive, unfortunately I neglected to command "cp" to preserve the files' ownerships while copying the files form the old /var directory.

While most things seem to be working fine with this (mosf of the files were seem to have been owned by root:staff anyway) some things dont:

1. Exim - I managed to get it to work by chownning the /var/log/mail and /var/spool/mail to mail:adm and chawning the users' spool files to be owned by the users - I hope this is the way it should be.
2. MySql - It doesn't work. it seems to be a problem with /var/run/mysqld/mysql.sock but it doesn't seem to be there, maybe I should change the directoryes permission? to what?
3. ws-imapd Seems to be working _very_ slow when accessing a user's primary spool file, can it have a problem with creating a lockfile or something?


Is there somwhere I can find a good specification to what the file permissions should be?
Is there a tool that can fix it all up for me?



Hi Barak,


I don't know the answers to your questions, but in case you're still having problems (or just want to compare for reassurance), here's some output from my laptop; it runs exim & mysql, but not uw-imap

I do run courier-imap on a different machine & it creates lockfiles as root:root in /var/run/courier

it's been a little while since I installed it anywhere, but iirc the 'tiger' package will look at all your file permissions in a security context & mail you a report (among other things). I don't know of anything that will automatically change them for you, short maybe of 'apt-get --reinstall mysql-server', etc.. though even that might respect your "custom" permissions(?)


[EMAIL PROTECTED]:~# ls -la /var total 56 drwxr-xr-x 14 root root 4096 Jan 6 15:25 . drwxr-xr-x 21 root root 4096 Mar 3 15:02 .. drwxr-xr-x 3 root root 4096 Mar 23 06:27 backups drwxr-xr-x 9 root root 4096 Mar 5 09:07 cache drwxr-xr-x 15 root root 4096 Jan 7 03:28 games drwxr-xr-x 35 root root 4096 Mar 9 10:08 lib drwxrwsr-x 2 root staff 4096 May 27 2000 local drwxrwxrwt 5 root root 4096 Mar 23 06:27 lock drwxr-xr-x 10 root root 4096 Mar 23 09:24 log drwxrwsr-x 2 root mail 4096 Mar 18 04:02 mail drwxr-xr-x 6 root root 4096 Mar 23 09:33 run drwxr-xr-x 5 root root 4096 Feb 8 04:25 spool drwxrwxrwt 5 root root 4096 Mar 23 09:35 tmp drwxrwxr-x 5 root root 4096 Mar 23 09:23 www [EMAIL PROTECTED]:~# ls -la /var/spool total 20 drwxr-xr-x 5 root root 4096 Feb 8 04:25 . drwxr-xr-x 14 root root 4096 Jan 6 15:25 .. drwxr-xr-x 5 root root 4096 May 12 2002 cron drwxr-xr-x 3 root root 4096 Feb 8 04:25 cups drwxr-x--- 5 mail mail 4096 Sep 13 2002 exim lrwxrwxrwx 1 root root 7 May 12 2002 mail -> ../mail [EMAIL PROTECTED]:~# ls -la /var/spool/exim total 20 drwxr-x--- 5 mail mail 4096 Sep 13 2002 . drwxr-xr-x 5 root root 4096 Feb 8 04:25 .. drwxr-x--- 2 mail mail 4096 Oct 16 06:17 db drwxr-x--- 2 mail mail 4096 Mar 23 10:03 input drwxr-x--- 2 mail mail 4096 Mar 23 10:03 msglog [EMAIL PROTECTED]:~# ls -la /var/mail total 108 drwxrwsr-x 2 root mail 4096 Mar 18 04:02 . drwxr-xr-x 14 root root 4096 Jan 6 15:25 .. -rw-rw---- 1 kenneth mail 95031 Mar 18 04:02 kenneth [EMAIL PROTECTED]:~# ls -la /var/log total 14548 drwxr-xr-x 10 root root 4096 Mar 23 09:24 . drwxr-xr-x 14 root root 4096 Jan 6 15:25 .. drwx------ 5 root root 4096 Oct 15 11:47 Bastille -rw-r--r-- 1 root root 30257 Mar 23 10:18 XFree86.0.log -rw-r----- 1 root root 1818 Mar 22 20:34 acpid drwxr-xr-x 2 root root 4096 Mar 23 06:27 apache -rw-r----- 1 root adm 4116 Mar 23 11:38 auth.log -rw-r----- 1 root adm 403889 Mar 23 06:47 auth.log.0 -rw-r----- 1 root adm 81873 Feb 2 06:47 auth.log.1.gz drwxr-xr-x 2 root root 4096 Mar 23 06:27 cron-apt -rw-r----- 1 root adm 562 Mar 23 10:18 daemon.log -rw-r----- 1 root adm 90877 Mar 23 00:58 daemon.log.0 -rw-r----- 1 root adm 36154 Feb 2 06:02 daemon.log.1.gz -rw-r----- 1 root adm 156 Mar 23 09:35 debug -rw-r----- 1 root adm 33840 Mar 22 23:41 debug.0 -rw-r----- 1 root adm 26595 Feb 2 00:20 debug.1.gz -rw-r--r-- 1 root root 8570 Mar 22 20:34 dmesg drwxr-s--- 2 mail adm 4096 Mar 23 06:25 exim -rw-r--r-- 1 root root 24072 Mar 5 16:47 faillog -rw-r--r-- 1 root root 601 Mar 17 11:54 fontconfig.log -rw------- 1 root root 16310 May 12 2002 installer.log.1 -rw-r----- 1 root adm 3852 Mar 23 11:20 kern.log -rw-r----- 1 root adm 2788296 Mar 23 04:01 kern.log.0 -rw-r----- 1 root adm 472634 Feb 2 00:21 kern.log.1.gz -rw-r----- 1 root adm 416403 Jun 4 2002 kern.log.2.gz -rw-r----- 1 root adm 3852 Mar 23 11:20 kernel -rw-r----- 1 root adm 2788296 Mar 23 04:01 kernel.0 -rw-r----- 1 root adm 407097 Feb 2 00:21 kernel.1.gz drwxr-xr-x 2 root root 16384 Mar 23 06:27 ksymoops -rw-rw-r-- 1 root utmp 292876 Mar 23 09:21 lastlog -rw-r----- 1 root adm 4459 Mar 23 11:38 loginlog -rw-r----- 1 root adm 426830 Mar 23 06:47 loginlog.0 -rw-r----- 1 root adm 63677 Feb 2 06:47 loginlog.1.gz -rw-r----- 1 root adm 0 Mar 23 06:47 lpr.log -rw-r----- 1 root adm 7242 Mar 22 20:35 lpr.log.0 -rw-r----- 1 root adm 292 Jan 31 07:23 lpr.log.1.gz -rw-r--r-- 1 root root 0 May 12 2002 mail.err -rw-r--r-- 1 root root 0 May 12 2002 mail.info -rw-r--r-- 1 root root 0 May 12 2002 mail.log -rw-r--r-- 1 root root 0 May 12 2002 mail.warn -rw-r----- 1 root adm 4965 Mar 23 11:34 messages -rw-r----- 1 root adm 2852544 Mar 23 06:27 messages.0 -rw-r----- 1 root adm 490352 Feb 2 06:43 messages.1.gz -rw-r----- 1 root adm 419144 Jun 4 2002 messages.2.gz drwxrwx--- 2 mysql mysql 4096 Mar 23 09:24 mysql -rw------- 1 mysql mysql 1580 Mar 23 11:34 mysql.log -rw------- 1 mysql mysql 346 Mar 22 20:35 mysql.log.1.gz -rw------- 1 mysql mysql 411 Mar 19 11:13 mysql.log.2.gz -rw------- 1 mysql mysql 411 Mar 17 19:18 mysql.log.3.gz -rw------- 1 mysql mysql 34862 Mar 14 10:34 mysql.log.4.gz drwxr-sr-x 2 news news 4096 May 12 2002 news drwxr-xr-x 2 root root 4096 Mar 23 06:27 ntpstats -rw-r--r-- 1 root root 0 Mar 23 06:27 scrollkeeper.log -rw-r--r-- 1 root root 0 Mar 18 06:27 scrollkeeper.log.1 -rw-r--r-- 1 root root 26391 Mar 17 11:55 scrollkeeper.log.2 -rw-r----- 1 root adm 4973 Mar 23 06:27 setuid.changes -rw-r----- 1 root adm 6467 Mar 20 06:28 setuid.changes.0 -rw-r----- 1 root adm 1496 Mar 18 06:27 setuid.changes.1.gz -rw-r----- 1 root adm 894 Mar 15 06:27 setuid.changes.2.gz -rw-r----- 1 root adm 1252 Mar 11 06:27 setuid.changes.3.gz -rw-r----- 1 root adm 1519 Mar 5 06:28 setuid.changes.4.gz -rw-r----- 1 root adm 880 Feb 27 06:27 setuid.changes.5.gz -rw-r----- 1 root adm 1261 Feb 26 06:27 setuid.changes.6.gz -rw-r----- 1 root adm 398831 Mar 23 06:27 setuid.today -rw-r----- 1 root adm 398831 Mar 20 06:28 setuid.yesterday -rw-r----- 1 root adm 8705 Mar 23 11:38 syslog -rw-r----- 1 root adm 36389 Mar 23 06:25 syslog.0 -rw-r----- 1 root adm 12794 Mar 20 06:25 syslog.1.gz -rw-r----- 1 root adm 23578 Mar 18 06:27 syslog.2.gz -rw-r----- 1 root adm 25803 Mar 15 06:27 syslog.3.gz -rw-r----- 1 root adm 38280 Mar 11 06:25 syslog.4.gz -rw-r----- 1 root adm 20644 Mar 5 06:25 syslog.5.gz -rw-r----- 1 root adm 8274 Feb 27 06:25 syslog.6.gz -rw-r----- 1 root adm 698 Mar 23 09:35 user.log -rw-r----- 1 root adm 38298 Mar 22 23:41 user.log.0 -rw-r----- 1 root adm 7874 Feb 2 02:02 user.log.1.gz -rw-r--r-- 1 root root 0 May 12 2002 uucp.log -rw-rw-r-- 1 root utmp 86400 Mar 23 09:35 wtmp -rw-rw-r-- 1 root utmp 1261824 Mar 10 12:22 wtmp.1 -rw-r--r-- 1 root root 16745 Jan 26 14:55 xdm.log [EMAIL PROTECTED]:~# ls -la /var/local total 8 drwxrwsr-x 2 root staff 4096 May 27 2000 . drwxr-xr-x 14 root root 4096 Jan 6 15:25 .. [EMAIL PROTECTED]:~# ls -la /var/lib total 140 drwxr-xr-x 35 root root 4096 Mar 9 10:08 . drwxr-xr-x 14 root root 4096 Jan 6 15:25 .. drwxr-xr-x 3 root root 4096 Jan 6 15:25 apache drwxr-xr-x 3 root root 4096 May 12 2002 apt drwxr-xr-x 2 root root 4096 Nov 20 22:31 aptitude drwxrwsr-t 2 root audio 4096 Dec 19 10:36 cddb drwxrwsr-x 4 root src 4096 Sep 28 20:57 cvs drwxr-xr-x 2 root root 4096 Feb 8 01:33 deborphan drwxr-xr-x 5 root root 4096 Mar 18 17:32 defoma drwxr-xr-x 2 root root 4096 Jan 7 07:57 dhcp drwxr-xr-x 2 root root 4096 Mar 5 16:48 dictd drwxr-xr-x 4 root root 4096 Oct 28 05:20 dictionaries-common drwxr-xr-x 7 root root 4096 Mar 23 11:24 dpkg drwxr-xr-x 2 root root 4096 May 13 2002 emacsen-common drwxr-xr-x 2 root root 4096 Jan 7 03:16 games drwxr-xr-x 3 root root 4096 May 12 2002 gnome drwxr-xr-x 3 root root 4096 Feb 11 14:04 gstreamer drwxr-xr-x 2 root root 4096 May 16 2002 logrotate drwxr-xr-x 2 root root 4096 May 12 2002 misc drwxr-xr-x 5 root root 4096 Feb 3 11:21 mozilla drwxr-xr-x 2 root root 4096 Dec 8 18:16 msttcorefonts drwxr-x--x 7 mysql mysql 4096 Mar 17 11:55 mysql drwxr-xr-x 2 root root 4096 Mar 23 11:35 ntp drwxr-xr-x 2 root root 4096 Mar 9 10:08 odbc drwxr-xr-x 2 root root 4096 Mar 22 20:35 pcmcia drwxr-xr-x 3 root root 4096 Mar 5 05:48 postgres drwxr-xr-x 2 root root 4096 Mar 23 09:33 sawfish drwxr-xr-x 30 root root 4096 Mar 17 11:55 scrollkeeper drwxr-xr-x 2 root root 4096 Aug 28 2002 setserial drwxr-xr-x 2 root root 4096 May 18 2002 shorewall drwxr-xr-x 2 root root 4096 Jan 25 14:49 snmp drwxr-xr-x 3 root root 4096 Dec 27 01:05 ucf drwxr-xr-x 2 root root 4096 Mar 22 20:34 urandom drwxr-xr-x 3 root root 4096 May 12 2002 xdm drwxr-xr-x 2 root root 4096 Jan 26 14:55 xkb [EMAIL PROTECTED]:~# ls -la /var/lib/mysql total 32 drwxr-x--x 7 mysql mysql 4096 Mar 17 11:55 . drwxr-xr-x 35 root root 4096 Mar 9 10:08 .. drwx------ 2 mysql mysql 4096 Feb 25 13:10 jobsearch -rw-r--r-- 1 mysql root 48 Mar 17 11:55 my.cnf drwxr-xr-x 2 mysql root 4096 Feb 5 15:29 mysql drwxr-xr-x 2 mysql root 4096 Feb 5 15:29 test drwx------ 2 mysql mysql 4096 Feb 21 19:10 ylayalidev drwx------ 2 mysql mysql 4096 Feb 6 13:00 zinextredev [EMAIL PROTECTED]:~# ls -la /var/run total 88 drwxr-xr-x 6 root root 4096 Mar 23 09:33 . drwxr-xr-x 14 root root 4096 Jan 6 15:25 .. srw-rw-rw- 1 root root 0 Mar 22 20:34 .acpid.socket -rw-r--r-- 1 root root 170 Mar 22 20:35 Xprint_servers -rw-r--r-- 1 root root 4 Mar 23 06:27 apache.pid -rw-r--r-- 1 root root 4 Mar 22 20:35 atd.pid -rw-r--r-- 1 root root 4 Mar 22 20:35 cardmgr.pid -rw-r--r-- 1 root root 4 Mar 22 20:35 crond.pid ---------- 1 root root 0 Mar 22 20:35 crond.reboot -rw-r--r-- 1 root root 4 Mar 22 20:34 dhclient.eth0.pid drwxr-xr-x 2 mail mail 4096 May 12 2002 exim -rw-r--r-- 1 root root 5 Mar 23 09:24 gdomap.pid -rw-r--r-- 1 root root 4 Mar 22 20:35 inetd.pid -rw-r--r-- 1 root root 4 Mar 22 20:34 klogd.pid drwxr-xr-x 2 mysql root 4096 Mar 23 09:24 mysqld drwxr-xr-x 2 root root 4096 Aug 28 2002 sshd -rw-r--r-- 1 root root 4 Mar 22 20:35 sshd.pid drwx------ 3 root root 4096 Jun 3 2002 sudo -rw-r--r-- 1 root root 4 Mar 22 20:34 syslogd.pid -rw-r--r-- 1 root root 4 Mar 22 20:34 usbmgr.pid -rw-rw-r-- 1 root utmp 6912 Mar 23 09:35 utmp -rw-r--r-- 1 root root 4 Mar 22 20:35 xfs.pid [EMAIL PROTECTED]:~# ls -la /var/run/mysqld total 12 drwxr-xr-x 2 mysql root 4096 Mar 23 09:24 . drwxr-xr-x 6 root root 4096 Mar 23 09:33 .. -rw-rw---- 1 mysql mysql 4 Mar 23 09:24 mysqld.pid srwxrwxrwx 1 mysql mysql 0 Mar 23 09:24 mysqld.sock


hth, kenneth


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Reply via email to