LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 05-07-2007, 08:02 PM   #1
TuxLives
Member
 
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145

Rep: Reputation: 15
deleted my /var/log directory


I accidentally deleted my /var/log directory (and it perm deleted not trash bin). Now my machine won't boot into X (kde). Any good way back or just reinstall?
 
Old 05-07-2007, 08:09 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Boot your machine with your install CD (or a rescue CD), mount the partition when /var lives and created the /var/log directory. The permissions on mine are 0755, the owner:group is root:root. Most of the logs files will be created when your box re-boots and if you get errors about missing log files, use the touch command to create them.

I may have misread your post - if you can already boot to a command prompt, login as root make the directory from there:
Code:
mkdir -p /var/log && chown root:root /var/log && chmod -c 0755 /var/log

Last edited by gilead; 05-07-2007 at 08:10 PM.
 
Old 05-07-2007, 09:02 PM   #3
TuxLives
Member
 
Registered: Sep 2003
Location: Tacoma, WA
Distribution: Mandriva all the way
Posts: 145

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by gilead
Boot your machine with your install CD (or a rescue CD), mount the partition when /var lives and created the /var/log directory. The permissions on mine are 0755, the owner:group is root:root. Most of the logs files will be created when your box re-boots and if you get errors about missing log files, use the touch command to create them.

I may have misread your post - if you can already boot to a command prompt, login as root make the directory from there:
Code:
mkdir -p /var/log && chown root:root /var/log && chmod -c 0755 /var/log

Thank you, that got me back to the desktop!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postgresql in /var/log deleted teacmalaysia Linux - General 2 06-04-2006 10:04 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Deleted /var/log/messages, how to create a new one? chingyenccy Linux - Security 2 02-27-2005 10:06 AM
Accidentally Deleted Everything In /var/log Joe Heng Slackware 3 12-23-2004 07:20 PM
accidently deleted /var/log/packages lennard Slackware 8 06-21-2004 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 10:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration