Hello,
I think something's very wrong here, but there should be an explonation, I just don't know what it is and I would really appreciate some help.
I have created a file owned by root:wheel and I have change it's permissions to 400 (-r--------) and when I switch to my user which is not root I am able to delete the file.
It's simple as that and it should be simple as that not possible but it appears to be quite possible. Tested it several times on 4 different FreeBSD 11.0 systems.
Please check this output.
Does anybody have idea why this is possible?
Am I crazy or something's very wrong?
Thank you
I think something's very wrong here, but there should be an explonation, I just don't know what it is and I would really appreciate some help.
I have created a file owned by root:wheel and I have change it's permissions to 400 (-r--------) and when I switch to my user which is not root I am able to delete the file.
It's simple as that and it should be simple as that not possible but it appears to be quite possible. Tested it several times on 4 different FreeBSD 11.0 systems.
Please check this output.
Code:
root@datacore3:/home/k_georgiev/test # pwd
/usr/home/k_georgiev/test
root@datacore3:/home/k_georgiev/test # touch file
root@datacore3:/home/k_georgiev/test # ls -la
total 10
drwxr-xr-x 2 k_georgiev k_georgiev 3 Apr 5 20:32 .
drwxr-xr-x 6 k_georgiev k_georgiev 14 Apr 5 20:32 ..
-rw-r--r-- 1 root k_georgiev 0 Apr 5 20:32 file
root@datacore3:/home/k_georgiev/test # echo test123 > file
root@datacore3:/home/k_georgiev/test # chown root:wheel file
root@datacore3:/home/k_georgiev/test #
root@datacore3:/home/k_georgiev/test # chmod 400 file
root@datacore3:/home/k_georgiev/test # ls -la
total 10
drwxr-xr-x 2 k_georgiev k_georgiev 3 Apr 5 20:32 .
drwxr-xr-x 6 k_georgiev k_georgiev 14 Apr 5 20:32 ..
-r-------- 1 root wheel 8 Apr 5 20:32 file
root@datacore3:/home/k_georgiev/test # exit
logout
$ pwd
/usr/home/k_georgiev/test
$ id
uid=1001(k_georgiev) gid=1001(k_georgiev) groups=1001(k_georgiev),0(wheel)
$
$ ls -la
total 10
drwxr-xr-x 2 k_georgiev k_georgiev 3 Apr 5 20:32 .
drwxr-xr-x 6 k_georgiev k_georgiev 14 Apr 5 20:32 ..
-r-------- 1 root wheel 8 Apr 5 20:32 file
$ rm file
override r-------- root/wheel uarch for file? y
$ ls -la
total 9
drwxr-xr-x 2 k_georgiev k_georgiev 2 Apr 5 20:33 .
drwxr-xr-x 6 k_georgiev k_georgiev 14 Apr 5 20:32 ..
$
Does anybody have idea why this is possible?
Am I crazy or something's very wrong?
Thank you