I was in the processs of learning a bit about the special permission in Linux. Where is find certain anomilies.
suid - For executable/files where user subsume the
UID/permission of the owner. With
UID range ~1-100.
sgid - For directories -
GID is subsumed and any file and or subdirtory holds the permission of original group instead of the creator's group.
However when I apply the permission using
chmod +s test, the system applies a blanket permission over both owner and group irrespective of the file type.
I know the representations is same for both
s but shouldn't that be applied judiciously with file type in mind?
For e.g :- I created a normal file
test and applied the aforementioned command. What surprises me is despite being a
normal file type the command is also applied on the
group side as well.
~$ chmod +s test ~$ ls -l test -rwSr-sr-x 1 shashwat shashwat 0 Jan 27 13:14 test ~$ file test test: setuid, setgid, empty
Is that normal? What kind of repercussion can occur from that kind file permission?