[FreeBSD] User Rechte in /var

lockdoc

Well-Known Member
Hallo,

mir ist leider ein kleiner Patzer passiert, Ich wollte in /var/svn ein "chown -R svn:svn *" machen, leider habe ich dieses in /var gemacht.
Danach kamen viele Fehler. Daraufhin habe ich ein "chown -R root:wheel" in /var gemacht, aber es ist noch nicht alles behoben, da sendmail immer noch rummeckert,

Code:
...
Oct 10 08:30:00 fileserver sm-mta[3533]: n9A6U0UB003533: SYSERR(root): collect: Cannot write ./dfn9A6U0UB003533 (bfcommit, uid=0, gid=25): Permission denied
Oct 10 08:33:04 fileserver sm-mta[3540]: n9A6X3Sh003540: SYSERR(root): collect: Cannot write ./dfn9A6X3Sh003540 (bfcommit, uid=0, gid=25): Permission denied
Oct 10 09:00:01 fileserver sm-mta[3570]: n9A700l8003570: SYSERR(root): collect: Cannot write ./dfn9A700l8003570 (bfcommit, uid=0, gid=25): Permission denied
Oct 10 09:03:04 fileserver sm-mta[3573]: n9A733Pp003573: SYSERR(root): collect: Cannot write ./dfn9A733Pp003573 (bfcommit, uid=0, gid=25): Permission denied
Oct 10 09:30:01 fileserver sm-mta[3597]: n9A7U0Rs003597: SYSERR(root): collect: Cannot write ./dfn9A7U0Rs003597 (bfcommit, uid=0, gid=25): Permission denied
Oct 10 09:33:04 fileserver sm-mta[3604]: n9A7X3lL003604: SYSERR(root): collect: Cannot write ./dfn9A7X3lL003604 (bfcommit, uid=0, gid=25): Permission denied
...

Diese Daten lieven in /var/spool/clientmqueue

Ich habe schon ein "chown -R smmsp:smmsp *" für /var/spool gemacht, aber das hilft nichts.

mein /var sieht wie folgt aus:

Code:
drwxr-xr-x  23 root   wheel  23 Oct  9 20:02 ./
drwxr-xr-x  19 root   wheel  24 Oct  9 14:33 ../
drwxr-xr-x   2 root   wheel   2 Sep 17 20:18 account/
drwxr-xr-x   4 root   wheel   4 Sep 17 20:18 at/
drwxr-x---   2 root   wheel   2 Sep 17 20:18 audit/
drwxr-x---   2 root   wheel   7 Oct 10 03:01 backups/
drwxr-x---   2 root   wheel   3 Sep 17 20:20 crash/
drwxr-x---   3 root   wheel   3 Sep 17 20:18 cron/
drwxr-xr-x  11 root   wheel  15 Oct  4 15:46 db/
dr-xr-xr-x   2 root   wheel   2 Sep 17 20:18 empty/
drwx------   2 root   wheel   2 Sep 17 20:18 heimdal/
drwxr-xr-x   3 root   wheel  40 Oct 10 08:00 log/
drwxrwxr-x   2 root   wheel  11 Oct  9 15:45 mail/
drwxr-xr-x   2 root   wheel   3 Oct  1 13:28 msgs/
drwxr-xr-x   5 root   wheel   5 Sep 17 20:18 named/
drwxr-xr-x   2 root   wheel   2 Sep 17 20:18 preserve/
drwxr-xr-x   6 root   wheel  22 Oct  9 18:03 run/
drwxrwxr-x   2 root   wheel   2 Sep 17 20:18 rwho/
drwxr-xr-x   9 smmsp  smmsp   9 Oct  2 05:34 spool/
drwx------   3 svn    svn     3 Oct  9 14:25 svn/
drwxrwxrwt   3 root   wheel  40 Oct  9 13:14 tmp/
drwxr-xr-x   4 root   wheel   4 Oct  9 16:45 www/
drwxr-xr-x   2 root   wheel   4 Sep 17 20:20 yp/

Kann mir mal jemand ein output von /var mit den richtigen userrechten posten oder sagen was hier falsch ist.

Danke
 
/var schaut hier so aus:

Code:
root@mars:~ # ls /var
total 10798
drwxrwx---   2 root    operator   512B Sep 20 10:14 .snap/
drwxr-xr-x   2 root    wheel      512B May  8  2005 account/
drwxr-xr-x   2 root    wheel      512B Sep 20 21:35 agentx/
drwxr-xr-x   4 root    wheel      512B Jun 20  2008 at/
drwxr-x---   2 root    audit      512B Jul 26  2007 audit/
drwxr-x---   2 root    wheel      512B Sep 13 22:01 backups/
drwxr-x---   2 root    wheel      512B Oct 25  2008 crash/
drwxr-x---   3 root    wheel      512B Jun 20  2008 cron/
drwxr-xr-x  18 root    wheel      512B Oct 10 11:15 db/
dr-xr-xr-x   2 root    wheel      512B May  8  2005 empty/
drwxrwxr-x   3 root    games      512B Apr 11  2007 games/
drwx------   2 root    wheel      512B May  8  2005 heimdal/
drwxr-x---   4 root    wheel      512B Apr 23 14:03 lib/
drwxr-xr-x   7 root    wheel      3.0K Oct 10 00:00 log/
drwxrwxr-x   2 root    mail       512B Jun  1 09:29 mail/
drwxr-xr-x   2 daemon  wheel      512B Jun 20  2008 msgs/
drwxr-xr-x   5 root    wheel      512B Sep 18  2005 named/
drwxr-xr-x   2 root    wheel      512B May  8  2005 preserve/
-rw-------   1 root    wheel       10M Sep 20 10:06 restoresymtable
drwxr-xr-x  13 root    wheel      1.0K Oct 10 12:43 run/
drwxrwxr-x   2 root    daemon     512B May  8  2005 rwho/
drwxr-xr-x  11 root    wheel      512B Aug 27 22:03 spool/
drwxrwxrwt  10 root    wheel       31K Oct 10 11:45 tmp/
drwxr-xr-x   2 root    wheel      512B May  5 13:02 yp/
 
... /var/spool ...

Code:
# ls -la
total 70
drwxr-xr-x   9 root   wheel     512 Aug 21 20:35 .
drwxr-xr-x  27 root   wheel     512 Oct 10 02:57 ..
drwxrwx---   2 smmsp  smmsp   55296 Mar  1  2008 clientmqueue
drwx--x---   3 root   cups      512 Aug 21 20:35 cups
drwxrwxr-x   2 uucp   dialer    512 Oct 10 00:58 lock
drwxr-xr-x   2 root   daemon    512 Jan  5  2009 lpd
drwxr-xr-x   2 root   daemon    512 Jan  5  2009 mqueue
drwx------   2 root   daemon    512 Jan  5  2009 opielocks
drwxr-xr-x   3 root   daemon    512 Feb 17  2007 output
 
Für solche Zwecke gibt es das schöne, praktische Tool "mtree(1)". Es gleicht Verzeichnishierarchien gegenüber einer Datenbank ab, kann Berechtigungen und Eigentümer nach dieser wieder herstellen. In /etc/mtree finden sich die Spezifikationen des FreeBSD-Basissystems, welche man also nur noch mit den Schaltern -U und vielleicht auch -d anwenden muss. :)
 
Zurück
Oben