Page 1 of 1

SOLVED: update/upgrade var/lock/apache2 permissions failure

Posted: Thu Jul 24, 2014 5:55 am
by rocketscove
I am running amahi on an old netbook using ubuntu 12.04.4 lts. First installed April 2012. I routinely use apt-get to install security recommendations. Today apache2 failed to upgrade to ver 2.2 with the following error:

Code: Select all

* Starting web server apache2 /var/lock/apache2 already exists but is not a directory owned by apache. Please fix manually. Aborting. [fail] invoke-rc.d: initscript apache2, action "start" failed.
Complete apt-get session attached.

My question is "can I simply change ownership of this directory to apache?"
and is this the correct syntax :
#chown -R apache:apache /var/lock/apache2

I have not tried to restart apache or any other testing. All suggestions will be appreciated.

Re: update/upgrade var/lock/apache2 permissions failure

Posted: Thu Jul 24, 2014 6:10 am
by bigfoot65

Re: update/upgrade var/lock/apache2 permissions failure

Posted: Thu Jul 24, 2014 6:57 am
by rocketscove
Thanks for quick reply..I had found this amahi bug report and also one on debian/apache from back in 2008. I am just unsure what to do.

Are you recomending total removal of /var/lock and restart apache???

$ ls -la /var/lock
lrwxrwxrwx 1 root root 9 Jan 11 2014 /var/lock -> /run/lock

The directory is owned by root. Will it rebuild with apache start/restart?? and with the correct permissions???

thanks again, dan

Re: update/upgrade var/lock/apache2 permissions failure

Posted: Thu Jul 24, 2014 7:55 am
by bigfoot65
Yes, that is the fix. This is an OS issue, so not much you can do.

Re: update/upgrade var/lock/apache2 permissions failure

Posted: Thu Jul 24, 2014 8:05 am
by rocketscove
Thanks, I removed /var/lock and apache started normally.
All's well, I hope.....dan

Re: SOLVED: update/upgrade var/lock/apache2 permissions fail

Posted: Thu Jul 24, 2014 8:48 am
by bigfoot65
Good to hear it's working now.