A
A
Arman2014-12-08 22:19:02
Debian
Arman, 2014-12-08 22:19:02

VPS (debian), samba logs do not clean up after themselves?

The server ran out of inodes, I decided to find out where they had gone. In general, I did not find anything strange, except for samba.

cat /etc/samba/smb.conf
...
# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m
...

With this config:
/# ls -l /var/log/samba/ | wc -l
18564

Are they needed? still and all in one folder? why so much? Most of the mask log. *. *. *. * - ip and in a row (~ 100 files per day).
How to treat? just delete sometimes? Or turn it off altogether?
As I understand it, samba is used only for "Parallels Power Panel" and goes right into the VPS template, it seems they don't use it anywhere else.
thank.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
brutal_lobster, 2014-12-10
@brutal_lobster

There are a lot of them - because the configuration says to create a separate log for each machine (%m)
You can specify a specific log file, or replace %m with %S.
So if you are not using samba, disable it and delete the logs.
18K is somehow not serious in order to run out of space)

find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question