nowox nowox - 1 year ago 86
Linux Question

Why do I have access to this file?

I have this file:

-rw-rw----+ 1 git git 16959 Jul 25 07:37 github.conf


I am this guy:

$ whoami
admin
$ id
uid=501(admin) gid=501(admin) groups=501(admin),4(adm)


I can also say this:

$ cat /etc/passwd | grep admin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
admin:x:501:501:,,,:/home/admin:/bin/bash

$ cat /etc/group | grep -E 'admin|git'
adm:x:4:admin
git:x:500:
admin:x:501:admin


How is it possible I can read this file
github.conf
. I don't belong to the
git
group and I am not
git
. How is it then possible?

Answer Source

It looks you have extended permissions on the file (signified by the +) when listing the permissions. run:

getfacl github.conf 

to see the extended access control list permissions

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download