Repairing Email User/Permissions

Discussion in 'General' started by corona, Sep 7, 2007.

  1. corona

    corona New Member

    I'm using ISPConfig for a small server (think it's still at latest stable version), recently had some issues with a number of files in the web directory getting copied in as root user, so I went and did a chown -R on /var/web directory, not realising the mail folders were in there too.
    Consequently email went down, as the permissions on all the email folders got trampled on.

    Is there a proper way to repair all the user/group/permissions in /var/web?

    I've since gone through, wrote a small script to restore the permissions on the user folders to what I think they're supposed to be, but I'm not certain they are correct, although email appears to be working correctly again.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Run the following SQL statements in the database:

    update isp_isp_web set status = 'u' where status = '';
    update isp_isp_user set status = 'u' where status = '';

    Then change a web record in the interface and click on save.
  3. corona

    corona New Member

    Ah, I get what you mean, that's pretty straightforward. Considering how easy it is to trash the owner/permissions on the system and kill everything, this should probably be included as an option next to repair database in the management menu. On the other hand maybe it's just me that plays on the command line too much without completely learning the directory structure of ispconfig.

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Changing the permissions on the shell recursively as root user is as simple as running rm -rf /, so there is nothing to avoid this, just be careful and never change recursively permissions for a complete structure of directories like /var /var/www, /etc/ /usr ...

Share This Page