Big Mess I Made - File/Directory Owner?

Discussion in 'General' started by BorderAmigos, Apr 8, 2009.

  1. BorderAmigos

    BorderAmigos New Member

    While doing some Drupal installation stuff I was chown'ing a directory recursively. This was a big mistake as I didn't notice that I had changed back to the root directory.

    Now my ISPconfig, DNS (BIND9), MySQL, Password Keyring, and who knows what else doesn't work. Apache2 is still working but I can't log in to anything, Webmin is still working.

    Can someone tell me or point me to the proper file and directory owners for ISPConfig, BIND, MySQL and the Keyring? I'll give you my first born in return, or a beer.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You mean you changed everything recursively starting form / or starting from the website root /var/www ?
     
  3. BorderAmigos

    BorderAmigos New Member

    From /

    Not everything was changed but apparently enough to cause problems. Mainly with the servers.

    If anyone can email directory listings showing groups and owners from a Debian or similar system that would probably give the information I need. Just a thought. [email protected]
     
    Last edited: Apr 8, 2009
  4. BorderAmigos

    BorderAmigos New Member

    Doing the following fixed the DNS (taken from Falko's install instructions)...

    chown -R bind:bind /var/lib/named/var/*
    chown -R bind:bind /var/lib/named/etc/bind

    But the MySQL and ??? still won't start up.

    Trying to start MySQL puts the following in the daemon.log...

    Code:
    Apr  8 09:33:00 host mysqld_safe[27123]: started
    Apr  8 09:33:00 host mysqld[27126]: 090408  9:33:00  InnoDB: Started; log sequence number 0 17056275
    Apr  8 09:33:00 host mysqld[27126]: 090408  9:33:00 [ERROR] Can't start server : Bind on unix socket: Permission denied
    Apr  8 09:33:00 host mysqld[27126]: 090408  9:33:00 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
    Apr  8 09:33:00 host mysqld[27126]: 090408  9:33:00 [ERROR] Aborting
    Apr  8 09:33:00 host mysqld[27126]: 
    Apr  8 09:33:00 host mysqld[27126]: 090408  9:33:00  InnoDB: Starting shutdown...
    Apr  8 09:33:02 host mysqld[27126]: 090408  9:33:02  InnoDB: Shutdown completed; log sequence number 0 17056275
    Apr  8 09:33:02 host mysqld[27126]: 090408  9:33:02 [Note] /usr/sbin/mysqld: Shutdown complete
    Apr  8 09:33:02 host mysqld[27126]: 
    Apr  8 09:33:02 host mysqld_safe[27189]: ended
    Apr  8 09:33:14 host /etc/init.d/mysql[27391]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Apr  8 09:33:14 host /etc/init.d/mysql[27391]: ^G/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Apr  8 09:33:14 host /etc/init.d/mysql[27391]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Apr  8 09:33:14 host /etc/init.d/mysql[27391]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Apr  8 09:33:14 host /etc/init.d/mysql[27391]: 
    
     
    Last edited: Apr 8, 2009
  5. BorderAmigos

    BorderAmigos New Member

    Progress... This got MySQL started

    Code:
    touch /var/run/mysqld/mysqld.sock
    chown mysql /var/run/mysqld/
    chown mysql /var/run/mysqld/mysqld.sock
    /etc/init.d/mysql start
    
    Then chown recursively to mysql in /var/lib/mysql got most of the databases working. Still some odd errors though.
     
  6. BorderAmigos

    BorderAmigos New Member

    VMWare is hosed, synaptic doesn't work, can't get a root terminal (says wrong password), can do sudo though...
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Most likely the esaiest way might be to do a complete reinstall. If thats not possible, you should consider to setup he same linux version on another PC or virtual machine and then compare the permissions of the folders.

    Personally I would do a reinstall as I expect that it will be shorter then trying to get the correct permissions again for thousands of files and directories.
     
  8. BorderAmigos

    BorderAmigos New Member

    Thanks. It took more than a month after the last time I did a complete reinstall to get all the applications and drivers installed correctly and everything tweaked. I'll just keep using the system in it's crippled form rather than do that again. Most things are back working. I'll reinstall the applications that aren't working and see if that helps.
     

Share This Page