Big problem with Chroot

Discussion in 'Installation/Configuration' started by djmostek, Sep 7, 2012.

  1. djmostek

    djmostek New Member

    Hello! I've given perm permissions by command
    chown -R flex:flex /var/www/
    to the /var/www/ catalogue (as I want to get access to this catalogu from ftp server) and then changed into
     chown -R ispconfig:ispconfig /var/www 
    to make it like it used to be and i have encountered 2 problems:

    my main domain do not works (error ERROR 503 - Service Unavailable!)
    and when I want to login as admin to my panel it returns me a bad password (I type data 100% correctly). What am I supposed to do now?
    Last edited: Sep 7, 2012
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You did a recursive chown on all directories which destroyed the prmissions for all files and directories of the sites incl. their chroots. If you have a backup of the /var/www directory, the you should restore that as /var/ww and its subdirectories are owned by different users, each website has its own user and group and some directories are owned by root. So you can not undo your first command with a single chown -R again.

    Btw, none f these directories are owned by user and group ispconfig, so your second command could not fix anything.
  3. djmostek

    djmostek New Member

    So if i have no backup of /var/www/ i should reinstall all the system? And how to list my ftp-server users? (commend pure-pw list) do not works
    Last edited: Sep 7, 2012
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try to change /var/www to user and group root, then run the ispconfig resync tool for the websites, you find it in ispconfig under tools. If this wont help, a reinstall might be nescessary.

    Your ftp users are in the mysql database, the table is named ftp_user
  5. djmostek

    djmostek New Member

    Thank you till, and if I can have one more question: in what way can I access the mysql databse while phpmyadmin do not works? And how to use resync tool when I cannot access my ispconfig panel. Is there any remote way?

    ps. While I am trying to change the ownership it returns mi 'its only read-only file system'.
    Last edited: Sep 8, 2012
  6. falko

    falko Super Moderator ISPConfig Developer

    I'd do a reinstall - I guess this will save you a lot of time compared to trying to fix the system.

    Anyway, if phpMyAdmin doesn't work, you can use the command line MySQL client. You can connect to MySQL as follows:

    mysql -u root -p
  7. djmostek

    djmostek New Member

    Yes you might be right. I've used this command in order to access mysql but it returns a problem. I guess that, however paintfull, it would be the only way - reinstalling the system.

    Just for the future, as I want one of my users to have full access to /var/www/ catalogue - how to do it safetly?
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The only user that can do this is the root user, e.g. by useing a scp connection. No other user has the priveliges to access all files of all sites.

Share This Page