Expanding the Logs

Asked by carrickfergus88 on 2010-02-07

Hi, I'm trying to figure out how to expand the date that a log is kept under /var/log to a month rather than 3-4 days. Is there a way to do this without having to view the .gz files?

Question information

English Edit question
Ubuntu gnome-utils Edit question
No assignee Edit question
Last query:
Last reply:
Ryan Dwyer (ryandwyer) said : #1

You can change it in /etc/logrotate.d/rsyslog. "rotate 7" means it keeps 7 rotations before deleting the oldest, and changing "daily" to "monthly" should make it rotate each month.

Ok, I found the directory but there is no "rsyslog." I've been playing around with some of the other logs though that list the "rotate7" etc. (all the files included in /etc/logrotate.d are: acpid, apport, apt, aptitude, cupsys, dpkg, ppp, scrollkeeper, unattended-upgrades, winbind, wpa_action). When I've tried changing "daily" to "monthly" in each file, it consistently says that I don't have the permissions. It says I'm not the owner. I am very much the sole owner.

Another instance:
Trying to access Lost & Found. It claims I don't have the permissions since it's owned by "root." Apparently root seems to be the owner?

If I delete this user, am I going to lose my booting information, etc. or is there a way to go around it?

Ryan Dwyer (ryandwyer) said : #3

No, don't delete your user account. Your account runs as a standard user but can "level up" temporarily to do administrative tasks. To edit those files you need to run gksu gedit /etc/logrotate.d/file from a terminal.

The lost and found folder is usually unimportant, but you can look in there by typing "su root" to become the root user in the terminal. You won't see your password when you enter it.

Read here for more info: https://help.ubuntu.com/community/RootSudo

Sam_ (and-sam) said : #4

> no "rsyslog."
Which Ubuntu version?

## Karmic standard installation
$cd /etc/logrotate.d/
user@host:/etc/logrotate.d$ ls
apport checkbox cups pm-utils speech-dispatcher wpa_supplicant
apt consolekit dpkg ppp unattended-upgrades
aptitude couchdb jockey-common rsyslog wpa_action

## Karmic: rsyslog is installed?
$dpkg -l rsyslog

## Other installation standard files

Can you help with this problem?

Provide an answer of your own, or ask carrickfergus88 for more information if necessary.

To post a message you must log in.