permissions problems after migrating from other server

Discussion in 'Installation/Configuration' started by Karasu, May 9, 2015.

  1. Karasu

    Karasu New Member

    Hi!
    I migrate my ispconfig panel, from my old server to new, all the data passed server to server from ssh and root permissions.
    Because of this, all folders in / var / www were with root privileges. I switched to www-data, yet things are not going well, there are some pages that follow showing me 500 error or having strange problems. That's when I realized that each folder of each web, has associated permissions and number of customer web. How could establish those permissions again automatically? Is there any way?

    thank you!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The /var/www folder ahs to be owned by root, it may not be owned by the user www-data. If you change sth euser to www-data, then please change it back as.

    Each website has ist own user and permissions, when you migrate a ispconfig server then you have to ensure that the permissions and owners of the files are preserved when you copy the data and you have to ensure that you migrate all web* users and client* groups from passwd, shadow, group and gshadow file first before you copy the data.

    A way to copy the data with correct permissions is e.g. this command, executed on the old server:

    rsync -avz -e ssh /var/www/ [email protected]:/var/www/

    If you migrated data without preserving owners and permissions, then delete everything in /var/www on the new server and then copy the data again.
     
    Karasu likes this.
  3. Karasu

    Karasu New Member

    Thank you very much for your answer, Till.

    The problem is that you copy all data from one server to another, without preserving permits and now I no longer have access to the old server ;( is why I asked if there was an automatic way to regenerate permits sites in /var/www, as is done by creating a new site from ISPConfig and create the appropriate folders.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, thats bad. You can try to enable "update permissions" under System > server config > web and the run tools > resync for websites, shell and ftp users. change owner of /var/www back to root first.
     
  5. Karasu

    Karasu New Member

    I try with resync for websites, shell and ftp users, but the permissions not changed to web or client group assigned to domain in sites tab ;(

    In my sites now when charged I see "ERR_CONNECTION_REFUSED" ;/
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you change the update permission setting under server config first? If not, then the resync can not alter the website settings at all.
     
  7. Karasu

    Karasu New Member

    How I can change the update permission setting in server config?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    See System > Server config > web in ISPConfig. There is a checkbox for that.
     

Share This Page