Apache Can't See Files & Dirs Created in /home

From: Victor Michaels (viktormichaels_at_not.a.real.address.com)
Date: 07/02/05

  • Next message: Duane Evenson: ""Error opening /dev/console" crashing kernel"
    Date: Fri, 1 Jul 2005 17:11:28 -0700
    
    

    After 10 years of Unix and Linux work, this is a problem so weird I'm
    not sure how to even describe it. At first I questioned my sanity. And
    although questions still remain in that regard, after 5 hours of
    futzing, I think there's something seriously wrong here.

    The system is a dedicated server leased from an ISP. I usually use my
    own boxes through a co-lo, but this is a special project for a client.

    THE SYSTEM

    # uname -a
    Linux host.erased.com 2.6.9-11.EL.rootsmp #1 SMP Fri Jun 10 14:47:25
    PDT 2005 i686 i686 i386 GNU/Linux

    # cat /etc/redhat-release
    Red Hat Enterprise Linux ES release 4 (Nahant Update 1)

    # df
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
                         151593140 2981408 140911252 3% /
    /dev/sda1 101086 18728 77139 20% /boot
    none 512224 0 512224 0% /dev/shm

    THE PROBLEM

    I enter the following line in /etc/httpd/conf/httpd.conf (without quotes):

    "Include /home/extra.conf"

    Then, I create the file:

    #emacs /home/extra.conf

    In the file, I put a test config line:

    #cat /home/extra.conf
    ServerName host.erased.com

    Now, the file is 100% there. And the perms are world readable:

    # ls -l /home/extra.conf
    -rw-r--r-- 1 root root 26 Jul 1 13:09 /home/extra.conf

    Restart the server:

    # service httpd restart
    Stopping httpd: [FAILED]
    Starting httpd: httpd: could not open document config file /home/extra.conf
                                                               [FAILED]

    The file is there. There's no doubt about. Now, I delete the file, and
    start from scratch in a different dir:

    #emacs /var/extra.conf

    Add the same line above, then:

    mv /var/extra.conf /home

    Restart the server:

    Stopping httpd: [ OK ]
    Starting httpd: [ OK ]

    It works. WHY????

    IT GETS WEIRDER

    It get's even stranger. If I create extra.conf in /home, and then move
    it to /etc/httpd/conf, or any other directory anywhere, I get the
    "httpd: could not open document" error. Files (at least .conf files)
    created in /home cannot be seen by Apache anywhere on the disk, but
    files created outside of /home can be seen anywhere by Apache,
    including inside of /home.

    It's the exact same problem for directories. If I create a directory
    for a virtserver in /home, and then point to it from DocumentRoot in
    Apache, I get the "not found" error. If I create the document
    structure outside of /home and move it into /home, Apache can see it.
    Identical permissions. In fact, I can do a cp -Rp /home/virtdir / , and
    then erase the original dir and mv the new clone back in, and it will
    work.

    Even stranger, if I create a dir outside of /home, and then move it
    into /home, I can then add more subdirs and they will be seen by
    Apache.

    Where do I start in solving this? The ISP is perplexed. If this a
    Redhat bug, a problem with the way the disk was formatted or
    partitioned? Do I need a complete reinstall, new hardware... any
    ideas???

    Thank You,

    Victor


  • Next message: Duane Evenson: ""Error opening /dev/console" crashing kernel"

    Relevant Pages