Re: What do these file permissions mean ---Sr-x--T ?

On 24 May 2007, in the Usenet newsgroup alt.os.linux.redhat, in article
<slrnf5c77o.frq.jorge@xxxxxxxxxxxxxxxxxxxxxxx>, jc@xxxxxxxxxxx wrote:

I have a program which copies data from an incoming device file into a
regular file. When the program finishes running, the permissions on
the newly created file are ---Sr-x--T, what does the T mean?

I suspect there is something severely b0rked with those permissions.

---Sr-x--T 1 root root 68480 May 21 21:08 data1

This was 'chmod 5050' which is quite unnecessary. Owner 'root' has
no permission, but were this to be run as a _binary_ executable, it should
be run as if the user was root (----S). The only entity that can delete or
change the file is the owner root (--T). The only one with any access to
the file (other than root who can access it anyway) is members of the
group 'root' - they can read and execute it (r-x).

-r--r-x--- 1 root root 36416 May 20 21:48 data2

Slightly less bizarre - 'chmod 0450'. The owner and group can read it,
and the group can execute it.

---------- 1 root root 83200 May 20 22:13 data3

No permissions at all (but root can still access it).

I am running this on a fc6 system with kernel 2.6.20, and the filesystem
the file is written unto is XFS.

Neither distribution, kernel, or file system should be creating such
bizarre permissions. This is something b0rked with the application that
is copying the data. (Executable permission must be explicitly set using
the 'chmod' command unless the original file had such permission. If that
were the case, the S permission would not be copied as this is a security
hole.) See the 'chmod' and 'umask' manual pages for more details.

Old guy