/var/lock/apache2 created with root:root ownership (apache2 can't create lock files in it)

Bug #150640 reported by Gustavo Carneiro
2
Affects Status Importance Assigned to Milestone
apache2 (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

Binary package hint: apache2

/etc/init.d/apache2 does:

case $1 in
        start)
                [ -f /etc/apache2/httpd.conf ] || touch /etc/apache2/httpd.conf
                [ -d /var/run/apache2 ] || mkdir -p /var/run/apache2
                [ -d /var/lock/apache2 ] || mkdir -p /var/lock/apache2
                #ssl_scache shouldn't be here if we're just starting up.
                [ -f /var/run/apache2/ssl_scache ] && rm -f /var/run/apache2/*ssl_scache*
                log_begin_msg "Starting web server (apache2)..."
                if $APACHE2CTL start; then
                        log_end_msg 0
                else
                        log_end_msg 1
                fi
        ;;

Since /etc/init.d/apache2 is start by root, mkdir -p will end up creating a directory that is owned by root. The file /etc/apache2/mods-available/dav_fs.conf contains:

DAVLockDB /var/lock/apache2/DAVLock

Since the directory /var/lock/apache2/ is owned by root, the module is unable create the lock file, and webdav does not work correctly (only allows reading).

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Hm.. maybe the ownership of the directory is not the main problem. DAV lock file is still not being created after fixing the lock directory :(

Revision history for this message
Gustavo Carneiro (gjc) wrote :

Oh, never mind my last comment. The lock file is created on demand, only on first DAV access. It works now.

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Which version of apache2 causes this problem ?

Changed in apache2:
status: New → Incomplete
Revision history for this message
Gustavo Carneiro (gjc) wrote :

I experience the problem with the ubuntu feisty version... *checks* apache2.2-common 2.2.3-3.2ubuntu0.1

Revision history for this message
Mathias Gug (mathiaz) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, this bug is a duplicate of bug 129920 and is being marked as such.

There is an updated version of apache2 for feisty in feisty-proposed that should fix your problem. Could you test the update and coment on bug 129920 ?

Changed in apache2:
status: Incomplete → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.