Re: Followup: access to /var/log/messages
On Fri, Sep 01, 2000 at 02:49:05PM -0500, William Jensen wrote:
> I used adduser <username> adm and it worked like a charm. My question is why
> does it work? The folder /var/log is owned by root and has root group. Why
> does adm have rights to that...how does that all fit together?
If you do
$ls -l /var/
You'll see (among other things)
drwxr-xr-x 16 root root 4096 Sep 1 07:59 log
So, /var/log/ is a directory, user root can read, write, and execute
everything in it, and group root and all others on the system can
read and execute everything in it. _But_
$ls -l /var/log/messages
gets you
-rw-r----- 1 root adm 78711 Sep 1 15:52 /var/log/messages
which tells you that user root can read and write to this file, and
anyone in the group adm can _read_ the file. No-one else can read
it, either.
A
--
Andrew Sullivan Computer Services
<sullivana@bpl.on.ca> Burlington Public Library
+1 905 639 3611 x158 2331 New Street
Burlington, Ontario, Canada L7R 1J4
Reply to: