Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Accidentally I delete /var/log folder My question is now can I recreate that folder again (and to work)

I have some issues on apache, and I can't see any logs because the /var/log folder don't exist anymore..

share|improve this question
add comment

1 Answer 1

In my system I have this:

% ls -lad /var/log
drwxr-xr-x 21 root root 12288 Nov  8 16:01 /var/log

So my first try would be to recreate that and reboot... (no guarantees: never tried that, and I have no time now to set up a VM just to try it...)

sudo mkdir /var/log
sudo chmod 755 /var/log

I hope that the various daemons will repopulate the directory correctly.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.