Comments (8)
Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!
from docker-syslog-ng.
It's working fine for me on aarch64
docker run -d --name=syslog -v /test/syslog/logs:/var/log -v /test/syslog/config:/config -p 5514:5514/udp -e PUID=1000 -e PGID=1000 lscr.io/linuxserver/syslog-ng:latest
logger -n 127.0.0.1 -P 5514 test
$ tail /test/syslog/logs/messages
Sep 23 19:12:08 172.17.0.1 ubuntu: test
Make sure your permissions are correct on your /var/log
mount.
from docker-syslog-ng.
Thanks for the reply, but I still cannot find any file in /test/syslog/logs
in your procedure.
How can I make sure my permissions are right?
The mount point is under the home directory where owned by PUID
, PGID
user.
from docker-syslog-ng.
It looks like it is permission issue, if I create messages
manually, and give 777
permission to the file then I can see the logs.
but why?
It also looks like the created permissions for ./config
and ./log
are different.
manager@raspberrypi:~/src/tmp/syslog-ng $ ls -alh
total 20K
drwxr-xr-x 4 manager manager 4.0K Sep 23 22:25 .
drwxr-xr-x 3 manager manager 4.0K Sep 23 17:28 ..
drwxr-xr-x 3 100999 100999 4.0K Sep 23 22:25 config
-rw-r--r-- 1 manager manager 419 Sep 23 22:25 docker-compose.yml
drwxr-xr-x 2 manager manager 4.0K Sep 23 22:25 log
manager@raspberrypi:~/src/tmp/syslog-ng $
from docker-syslog-ng.
The container will chown /config to the user and group ID you provide via PUID and PGID but won't touch the /var/log mount because it doesn't know what other stuff you might have in there from other systems/containers and we don't want to risk trashing your stuff.
A uid/gid of 100999
suggests you're running rootless/userns remapping, which we don't support but fundamentally you just need to create the log
folder so that it's owned by that same uid/gid so the syslog-ng daemon can write to it.
from docker-syslog-ng.
Thanks for the comments.
Now I can understand why this happens,
but still can't understand why the permission of /var/log is not changed to PUID/PGID.
I am a big fan of you one of the reason is the support of PUID/PGID, too sad to me if I have to change the permission manually.
Is there any workaround? Thanks again for your comment.
from docker-syslog-ng.
As a rule we never touch permissions on any folders other than /config because we can't be sure users aren't using them for other things. Imagine if your log
folder was being used by a bunch of different applications to store logs, as well as syslog-ng, and we chowned it to your PUID/PGID user - it could easily break all the other apps writing to it. We know we control /config so it's safe for us to chown it.
You can just do a one-time chown -R uid:gid ./log
and then you should be fine going forward unless you change your PUID/PGID settings.
from docker-syslog-ng.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from docker-syslog-ng.
Related Issues (9)
- [BUG] missing libdbi-drivers for sql backend support HOT 1
- [FEAT] Option to run rootless mode HOT 2
- Unable to find image 'lscr.io/linuxserver/syslog-ng:latest' locally HOT 2
- [BUG] credentials in ci HOT 2
- [BUG] Can't create /var/log/messages and /var/log/messages-kv.log HOT 14
- [BUG] TLS Port given in docker-compose is never used in config HOT 9
- [BUG] Error opening plugin module; module='cloud_auth' HOT 5
- Can't reload syslog-ng HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-syslog-ng.