/Home duplicating folders to /var/www and transparent proxy problem

Discussion in 'Server Operation' started by dalitso, Nov 9, 2009.

  1. dalitso

    dalitso New Member

    I have setup postfix to deliver mail to Maildir/ and my apache site directory to /home/user/public_html. It works fine only recently I have noticed that every folder and file in /home/ is being duplicated in /var/www/
    How can I stop this duplicating?

    Another thing is that when I setup transparency proxy, I cannot access any remote servers via vpn or webmin. Is there a way to correct this or its just one of the disadvantages of transparent proxy?

    I'm using ubuntu 8.04 server

    Your help will be greately appreciated.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Did you maybe set up a cron job that's syncing the directories? What's the output of
    Code:
    crontab -l
    ?
     
  3. dalitso

    dalitso New Member

    No, I did not set up any cron jobs. If its possible mayb some of the packages am running did that automatically. I'm running

    Apache Webserver
    BIND DNS Server
    DHCP Server
    Dovecot IMAP/POP3 Server
    Fetchmail Mail Retrieval
    MySQL Database Server
    Postfix Mail Server
    ProFTPD Server
    SSH Server
    Samba Windows File Sharing
    Squid Proxy Server
    Virtualmin Virtual Servers (GPL)
    Webalizer Logfile Analysis

    I mostly use webmin for configurations and commands here and there.

    Here's the output of crontab -l

    Code:
    22 12 * * * /etc/webmin/cron/tempdelete.pl
    3,8,13,18,23,28,33,38,43,48,53,58 * * * * /etc/webmin/virtual-server/collectinfo.pl
    0,3,5,8,11,14,17,19,22,25,28,30,32,35,37,40,42,45,49,52,54,56,58 * * * * /etc/webmin/fetchmail/check.pl --mail fetchmail\@martinology\.co\.za --errors
    25 0 * * * /etc/webmin/webalizer/webalizer.pl /home/martin/logs/access_log
    0 * * * * /etc/webmin/bandwidth/rotate.pl
    37 0 * * * /etc/webmin/webalizer/webalizer.pl /home/webmail-martinology.selfip.org/logs/access_log
    
     
    Last edited: Nov 10, 2009
  4. falko

    falko Super Moderator Howtoforge Staff

    What are the outputs of
    Code:
    mount
    and
    Code:
    ls -la /home
    and
    Code:
    ls -la /var/www
    ? What's in /etc/fstab?
     
  5. dalitso

    dalitso New Member

    Here are the outputs

    Code:
    > mount
    /dev/sda1 on / type ext3 (rw,relatime,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
    varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
    varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
    udev on /dev type tmpfs (rw,mode=0755)
    devshm on /dev/shm type tmpfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    /dev/sda2 on /home type ext3 (rw,relatime,resgid=1002)
    /dev/sda5 on /share type ext3 (rw,relatime)
    /var/www on /home type none (rw,bind)
    securityfs on /sys/kernel/security type securityfs (rw)
    
    Code:
    > ls -la /home
    total 44
    drwxr-xr-x 10 root                           root                           4096 2009-11-07 23:41 .
    drwxr-xr-x 23 root                           root                           4096 2009-09-07 20:39 ..
    -rw-------  1 root                           root                              0 2009-09-07 20:36 aquota.user
    drwxr-xr-x  4 dalitso                        users                          4096 2009-11-05 12:43 dalitso
    drwxr-xr-x  3 demster                        users                          4096 2009-11-12 15:45 demster
    drwxrwxrwx  3 ftp                            nogroup                        4096 2009-10-27 20:58 ftp
    -rw-r--r--  1 root                           root                             45 2009-09-07 18:37 index.html
    drwxr-xr-x  9 martin                         martin                         4096 2009-11-12 15:45 martin
    drwxr-xr-x  4 ngonie                         users                          4096 2009-11-12 15:45 ngonie
    drwxr-xr-x  2 squid                          squid                          4096 2009-10-30 11:21 squid
    drwxr-xr-x  2 root                           root                           4096 2009-11-02 06:45 webalizer
    drwxr-xr-x  6 webmail-martinology.selfip.org webmail-martinology.selfip.org 4096 2009-11-07 23:41 webmail-martinology.selfip.org
    
    Enter a shell command to execute in the text field below. The cd command may be used to change directory for subsequent commands.
    Code:
    > ls -la /var/www
    total 44
    drwxr-xr-x 10 root                           root                           4096 2009-11-07 23:41 .
    drwxr-xr-x 16 root                           root                           4096 2009-09-07 21:07 ..
    -rw-------  1 root                           root                              0 2009-09-07 20:36 aquota.user
    drwxr-xr-x  4 dalitso                        users                          4096 2009-11-05 12:43 dalitso
    drwxr-xr-x  3 demster                        users                          4096 2009-11-12 15:45 demster
    drwxrwxrwx  3 ftp                            nogroup                        4096 2009-10-27 20:58 ftp
    -rw-r--r--  1 root                           root                             45 2009-09-07 18:37 index.html
    drwxr-xr-x  9 martin                         martin                         4096 2009-11-12 15:49 martin
    drwxr-xr-x  4 ngonie                         users                          4096 2009-11-12 15:45 ngonie
    drwxr-xr-x  2 squid                          squid                          4096 2009-10-30 11:21 squid
    drwxr-xr-x  2 root                           root                           4096 2009-11-02 06:45 webalizer
    drwxr-xr-x  6 webmail-martinology.selfip.org webmail-martinology.selfip.org 4096 2009-11-07 23:41 webmail-martinology.selfip.org
    

    Code:
    root@wani:~# nano /etc/fstab
    
      GNU nano 2.0.7              File: /etc/fstab
    
    
    
    # /etc/fstab: static file system information.
    
    #
    
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    
    proc            /proc           proc    defaults        0       0
    
    # /dev/sda1
    
    UUID=8c30055e-5ee8-4d45-85cd-3842c307bbd5 /               ext3    relatime,erro$
    
    # /dev/sda2
    
    UUID=b64a58e9-207f-4268-9046-6f168ecf8728  /home  ext3  suid,resgid=1002,dev,re$
    
    # /dev/sda5
    
    UUID=67db335f-da38-40ee-b0cf-67e607bf5727 /share          ext3    relatime     $
    
    # /dev/sda3
    
    UUID=dd993637-3f4e-4074-9597-83cf8e812834 none            swap    sw           $
    
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    
    /var/www /home none bind
    
    

    According to the outputs from commands "mount" and "fstab" it shows that /home is linked to /var/www
    I did some digging and found out that "virtualmin" a webmin module is responsible for that. If virtualmin is installed by a webmin module file, it cannot use /home so a link between /home and /var/www has to exist. If installed with a script (something like virtualmin.sh) this problem is taken care of. (not sure if the link is still made during the script install as well)

    Thank you very much for your help; the commands you suggested really nailed down the problem.
     

Share This Page