Internal Server Error After Permission Change

Discussion in 'Installation/Configuration' started by LeakProbeAdmin, Sep 4, 2018.

  1. LeakProbeAdmin

    LeakProbeAdmin New Member

    I have accidentally messed up all my permissions in /var/www and since then ISPConfig3 has been giving me a 500 internal server error.
    To remedy this i've made the owner www-data but it doesnt fix ISPConfig3
    Can someone point me in the right direction here?
    Thanks & Kind Regards

    *EDIT Can this be moved to the ISPConfig 3 forum i posted it here by mistake
    Last edited: Sep 4, 2018
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you changed owners, permissions or both?
    If for some reason you can not restore the files from backups, here are the permissions from my host.

    Directory /var/www is owned by root:root. Permissions are drwxr-xr-x
    The file /var/www/apps is owned by ispapps:ispapps. Other files in /var/www are onwed by root:root, and most of them are symlinks to /var/www/clients/... . Permissions are drwxr-xr-x for those files that are not symlinks.
    The directories /var/www/clients/client* are owned by root:root and permissions drwxr-xr-x.
    In directory /var/www/clientX the web* directories are owned by web*:clientX. Symlink files are owned by root:root.
    Here is an example from one of the web201 directories:
    [email protected]:/var/www/clients/client1/web201# ls -lh
    yhteensä 28K
    drwxr-xr-x 2 web201 client1 4,0K maali 11 16:01 cgi-bin
    drwxr-xr-x 2 root   root    4,0K syys   4 07:13 log
    drwx--x--- 2 web201 client1 4,0K maali 11 16:01 private
    drwxr-xr-x 2 root   root    4,0K touko 25 17:20 ssl
    drwxrwx--- 2 web201 client1 4,0K syys   4 14:51 tmp
    drwx--x--x 7 web201 client1 4,0K elo   30 09:43 web
    drwx--x--- 2 web201 client1 4,0K huhti  6 16:22 webdav
    [email protected]:/var/www/clients/client1/web201#
    As you see, it is easier to restore from backups.
    If you don't have backups, start taking them and make sure you can restore them properly.
  3. LeakProbeAdmin

    LeakProbeAdmin New Member

    Thanks for your help, i managed to fix the permissions with this information.
    I learned a very very valuable lesson today. Do not mess with this stuff without taking a backup.
    Thanks for your help
    till likes this.

Share This Page