Closed yodapotatofly closed 2 years ago
Unfortunately this script is out of date. You can rotate logs without sudo, for example:
docker exec CONTAINER_ID logrotate -v -f /etc/logrotate.d/suricata
note that forces and does it verbosely just to show that its working.
Thanks, I've updated the README and removed this helper script.
I had tried that but i was running into some logrotate permission issue so I assumed sudo was required.
Thanks :)
Log rotate will complain if the directory permissions aren't just right.. Was that it? Thats something I could look into making sure if correct on container startup, cause if its a host volume, who knows what the permissions are to start with.
Yep, i was testing on WSL and permissions with docker doesn't behave like in real linux. It was indeed a bind-mout to a host volume, but the host volume, in this particular case, was already a mountpoint from windows into WSL linux 😅
On standard linux, the mount doesn't seem to mess up the permissions.
Yep, i was testing on WSL and permissions with docker doesn't behave like in real linux.
It was indeed a bind-mout to a host volume, but the host volume in this particular case was itself a mountpoint from windows into WSL linux 😅
On standard linux, the mount doesn't seem to mess up the permissions.
Oh it can in Linux as well. But you've added yet another layer of abstraction.
I've played with WSL a little, but with no real access from WSL to a real network interface I haven't got far.
Hello,
in here master/examples/logrotate.sh, you suggest using
docker exec suricata sudo logrotate /etc/logrotate.d/suricata $@
to rotate the logs. However,sudo
doesn't appear to be installed in the container :Am I missing something ?