Misconfiguration with symbolic links in /var/www

Discussion in 'ISPConfig 3 Priority Support' started by MaxT, Jun 18, 2017 at 2:45 AM.

  1. MaxT

    MaxT Member HowtoForge Supporter

    Hi,

    I have this misconfiguration of clients and the /web symbolic links:

    Here there is the symbolic link to /web12:

    Code:
    # ll /var/www/domain.com
    total 40K
    drwxr-xr-x  2 web12 client6 4,0K mié 10/05/2017 00:03 backup/
    drwxr-xr-x  2 web12 client6 4,0K mar 09/05/2017 04:45 cgi-bin/
    drwxr-xr-x  2 root  root  4,0K mar 06/06/2017 00:03 log/
    drwx--x---  3 web12 client6 4,0K vie 12/05/2017 01:55 private/
    drwxr-xr-x  2 root  root  4,0K sáb 13/05/2017 00:56 ssl/
    drwxrwx---  2 web12 client6 4,0K lun 05/06/2017 22:12 tmp/
    drwx--x--x 20 web12 client6 4,0K mar 30/05/2017 22:47 web/
    lrwxrwxrwx  1 root  root  31 mar 06/06/2017 06:10 web12 -> /var/www/clients/client6/web12//
    drwx--x---  2 web12 client6 4,0K mar 09/05/2017 04:45 webdav/
    drwxr-xr-x 10 root  root  4,0K mar 06/06/2017 06:10 ./
    drwxr-xr-x 14 root  root  4,0K mar 06/06/2017 06:10 ../
    
    
    and it shows /web it's empty:
    
    #ll /var/www/domain.com/web12/web
    total 16K
    drwxr-xr-x  2 root  root  4,0K mar 06/06/2017 06:10 error/
    drwxr-xr-x  2 web12 client6 4,0K dom 18/06/2017 00:04 stats/
    drwxr-xr-x  4 root  root  4,0K mar 06/06/2017 06:10 ./
    drwxr-xr-x 10 root  root  4,0K mié 07/06/2017 00:04 ../
    
    
    however it's full:
    
    # ll /var/www/domain.com/web
    total 312K
    drwxr-xr-x 11 web12 client6 4,0K lun 03/04/2017 03:29 administrator/
    drwxr-xr-x  2 web12 client6 4,0K mié 10/05/2017 13:34 bin/
    drwxr-xr-x  2 web12 client6 4,0K sáb 13/05/2017 08:02 cache/
    drwxr-xr-x  2 web12 client6 4,0K mié 10/05/2017 13:34 cli/
    drwxr-xr-x 22 web12 client6 4,0K mar 16/05/2017 06:44 components/
    drwxr-xr-x  2 web12 client6 4,0K vie 12/05/2017 05:26 error/
    drwxr-xr-x  2 web12 client6 4,0K mar 30/05/2017 22:57 tmp/
    drwx--x--x 20 web12 client6 4,0K mar 30/05/2017 22:47 ./
    drwxr-xr-x 10 root  root  4,0K mar 06/06/2017 06:10 ../
    -rw-r--r--  1 web12 client6  836 lun 22/05/2017 12:49 robots.txt.dist
    -rw-r--r--  1 web12 client6 3,6K mar 30/05/2017 22:47 .htaccess
    -rw-r--r--  1 web12 client6  15K sáb 13/05/2017 00:20 favicon.ico
    -r--r--r--  1 web12 client6 3,6K mar 30/05/2017 22:54 configuration.php
    -rw-r--r--  1 web12 client6 1,4K lun 22/05/2017 12:49 index.php
    

    same result listing /var/www/clients:
    Code:
    # ll /var/www/clients/client6
    total 12K
    drwxr-xr-x 10 root root 4,0K mié 07/06/2017 00:04 web12/
    drwxr-xr-x  3 root root 4,0K mar 06/06/2017 06:10 ./
    drwxr-xr-x  8 root root 4,0K mar 06/06/2017 06:10 ../
    lrwxrwxrwx  1 root root  31 mar 06/06/2017 06:10 domain.com -> /var/www/clients/client6/web12//
    
    
    # ll /var/www/clients/client6/domain.com/web
    total 16K
    drwxr-xr-x  2 root  root  4,0K mar 06/06/2017 06:10 error/
    drwxr-xr-x  2 web12 client6 4,0K dom 18/06/2017 00:04 stats/
    drwxr-xr-x  4 root  root  4,0K mar 06/06/2017 06:10 ./
    drwxr-xr-x 10 root  root  4,0K mié 07/06/2017 00:04 ../
    

    the main problem is that I have differences in some folders like /stats:
    Code:
    # ll /var/www/clients/client6/web12/web/stats
    total 1,3M
    drwxr-xr-x 2 web12 client6 4,0K dom 18/06/2017 00:04 ./
    drwxr-xr-x 4 root  root  4,0K mar 06/06/2017 06:10 ../
    -rwxr-xr-x 1 web12 client6  127 vie 09/06/2017 01:43 .htaccess
    -rw-r--r-- 1 web12 client6  92K dom 18/06/2017 00:04 awsindex.html
    -rw-r--r-- 1 web12 client6  38K dom 18/06/2017 00:04 awstats.domain.com.alldomains.html
    -rw-r--r-- 1 web12 client6 130K dom 18/06/2017 00:04 awstats.domain.com.allhosts.html
    -rw-r--r-- 1 web12 client6 9,2K dom 18/06/2017 00:04 awstats.domain.com.allrobots.html
    
    # ll /var/www/domain.com/web/stats
    total 976K
    drwxr-xr-x  2 web12 client6 4,0K vie 02/06/2017 00:03 2017-5/
    drwxr-xr-x  3 web12 client6 4,0K mar 06/06/2017 00:03 ./
    drwx--x--x 20 web12 client6 4,0K mar 30/05/2017 22:47 ../
    -rwxr-xr-x  1 web12 client6  127 sáb 13/05/2017 06:07 .htaccess
    -rw-r--r--  1 web12 client6  90K mar 06/06/2017 00:03 awsindex.html
    -rw-r--r--  1 web12 client6  27K mar 06/06/2017 00:03 awstats.domain.com.alldomains.html
    -rw-r--r--  1 web12 client6 114K mar 06/06/2017 00:03 awstats.domain.com.allhosts.html
    -rw-r--r--  1 web12 client6 8,2K mar 06/06/2017 00:03 awstats.domain.com.allrobots.html
    
    

    This is the listing of the /var/www structure:
    Code:
    # ll /var/www
    total 60K
    drwxr-xr-x  2 ispapps ispapps 4,0K mar 06/06/2017 02:02 apps/
    drwxr-xr-x  8 root  root  4,0K mar 06/06/2017 06:10 clients/
    drwxr-xr-x  2 root  root  4,0K mar 06/06/2017 06:10 conf/
    lrwxrwxrwx  1 root  root  34 mar 06/06/2017 02:04 ispconfig -> /usr/local/ispconfig/interface/web/
    drwxr-xr-x 11 root  root  4,0K mar 06/06/2017 06:10 php-fcgi-scripts/
    drwxr-xr-x  2 root  root  4,0K sáb 17/06/2017 02:00 webalizer/
    drwxr-xr-x 14 root  root  4,0K mar 06/06/2017 06:10 ./
    drwxr-xr-x 15 root  root  4,0K mié 07/06/2017 00:04 ../
    drwxr-xr-x 10 root  root  4,0K mar 06/06/2017 06:10 domain.com/
    drwxr-xr-x  9 root  root  4,0K mar 06/06/2017 06:10 domain2.com/
    drwxr-xr-x  9 root  root  4,0K mar 06/06/2017 06:10 domain3.com/
    drwxr-xr-x 10 root  root  4,0K mar 06/06/2017 06:10 domain4.com/
    drwxr-xr-x 10 root  root  4,0K mar 06/06/2017 06:10 domain5.com/
    ...
    -rw-r--r--  1 root  root  177 mar 06/06/2017 01:24 index.html
    
    
    # ll /var/www/clients/
    total 32K
    drwxr-xr-x  3 root root 4,0K mar 06/06/2017 06:10 client1/
    drwxr-xr-x  4 root root 4,0K mar 06/06/2017 06:10 client2/
    drwxr-xr-x  3 root root 4,0K mar 06/06/2017 06:10 client3/
    drwxr-xr-x  3 root root 4,0K mar 06/06/2017 06:10 client4/
    drwxr-xr-x  3 root root 4,0K mar 06/06/2017 06:10 client5/
    drwxr-xr-x  3 root root 4,0K mar 06/06/2017 06:10 client6/
    drwxr-xr-x  8 root root 4,0K mar 06/06/2017 06:10 ./
    drwxr-xr-x 14 root root 4,0K mar 06/06/2017 06:10 ../
    
    after the migration from an old server, the server was resyncronized with the option inside ISCP.

    Is there some way to fix this?.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    So /var/ww.domain.com on your system is a folder but it should be a symlink.

    Which values do you have in the website path and website symlinks field under System > server config > web?
    And how did you do the migration? Maybe you converted the /var/www/domain.com symlinks of the old server to directories on the new one while copying over the data.
     
  3. MaxT

    MaxT Member HowtoForge Supporter

    yes, it is.
    In the migration process I had decompress the tar.gz archives for every client. Maybe the symbolic links were re-created as folders??

    I have in System > server config > web :
    Code:
    base web folder:
    /var/www
    
    web folder:
    /var/www/clients/client[client_id]/web[website_id]
    
    symbolic web folder:
    /var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/
    
    What can I do?.
    Should I move the subfolders of every website into /var/www/clients/client(id)/web and later create a symbolic link ?. It can create further problems for ISPC?
    I think better waiting for the update to 3.1.4 until resolve this.

    thanks for the help!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's probably the only solution if you can't redo the data copy part with keeping symlinks.
     
    MaxT likes this.
  5. MaxT

    MaxT Member HowtoForge Supporter

    I notice inside ISCP -> Clients there is one item named "Domains" at the end of the side bar. This item is not present in the ISCP demo. Perhaps I have installed this module long time ago, I cannot remember.
    When I click in this item there is the the list of all the websites. Well, I should create new domains here.

    I don't know if there is some relation with this module but the symbolic links are different:
    domain names are folders, and inside every folder /var/www/domain1.com/ there is a symbolic link: web1 -> /var/www/clients/client1/web1/ . However, there is also a /var/www/domain1.com/web folder and from here the duplication.

    I have created a new site to test but it works well, and it don't create that duplication. All seems to be right and it don't create a /var/www/domain.com as a folder

    Now I'm moving all the websites folders contents into /var/www/clients... and later creating a symbolic link.

    However, I don't know how can I enable/disable this module. I don't know if this can be the cause or the cause was the decompression of .tar.gz /clients from the old server.

    This "Domains" module can be related with duplication failure?. Should I disable this?

    thanks,
     
    Last edited: Jun 22, 2017 at 5:13 PM
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    This is the domain module, it is available under Clients > domains now when the domain module is active under System > Interface config. But this list is not a list of websites, these are just domain names that are assigned to a client, not more and not less. This list is not related to your problem, the reason for your issue is that symlinks were replaced with directories during data restore. Websites are listed under Sites in ISPConfig.
     
    MaxT likes this.
  7. MaxT

    MaxT Member HowtoForge Supporter

    ok, good to know it. So I go to replace all.

    thanks!
     

Share This Page