Hi. My apologizes if my questions seem to have obvious. I’m a rookie to Linux
I’m creating an industrial application for non administrator persons, executed in non-admin mode
In this program, I need to look at the “Linux journal” → var/log and get informations inside.
problem: the folder var/log is write-only for non admin (read-write for admin)
Question: is there a way for non-admin application to access those? is it possible to grant exceptional permissions to specific programs?
You tagged this as “other”. Which means to us that you are using a non-supported version of openSUSE. We will still try to help you, but telling then which version you use is the more important!
BTW, in my openSUSE Leap 15.5:
boven:/var # ls -ld /var/log
drwxr-xr-x 21 root root 12288 Aug 28 07:56 /var/log
boven:/var #
which means that everybody can read and access that directory, but the only the owner root can write to it.
This is contrary to what you say?
It is indeed the case that most files in /var/log/ have permissions like this one:
boven:/var # l log/messages
-rw-r----- 1 root root 1707418 Aug 28 10:25 log/messages
boven:/var #
which means that other users (not being member of the root group) can not read those files. This is for obvious security reasons.
my version, in “details” window is
SUSE Linux Enterprise 15 SP3
which means that everybody can read and access that directory, but the only the owner root can write to it.
This is contrary to what you say?> Citation
I confirm, what I say is the contrary
My program uses an API who writes to var/log/messages in the non-admin accounts, even if the right access are “none”
thus I wandered if if was possible to read as well, but I have now the feeling it’s not.