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

.



Relevant Pages

  • Re: Getting rights right
    ... Unfortunately that command was a mistake. ... is a directory or already had execute permission. ... If the permissions were set correctly in the ... If you want to verify what chmod is doing the GNU chmod command has ...
    (Debian-User)
  • Re: [SLE] Stupid newbie user rights question
    ... environment and not really used to Linux permissions. ... the root privilege is assigned on a per system basis. ... These are read, write execute. ...
    (SuSE)
  • Re: Unable to su as a user, I get: Cannot execute /bin/bash: Permission denied
    ... sorry..i lost you on that...you think that someone changed the permissions ... It'll be executed by the user, not root. ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Also to be a right prat, chmod a-x `which chmod` (don't do it, but i've ...
    (Debian-User)
  • Re: [opensuse] command line question
    ... can't do something but root can, the problem is usually one of permissions. ... Absent recompilation, VLC does not ... No one has as yet explained what security issues could possibly exist playing a local source DVD, .ts, .mpeg, .mp3 or the like outside a Windows desktop environment. ...
    (SuSE)
  • Re: What does S mean in mode? And how to remove it?
    ... It's not the typical permissions I would expect to see. ... If you know how the chmod and the modes are used, ... User = rwx (The "root" user has read, write, and execute permissions ... One of the things that the S-bit does is controls how other files get ...
    (comp.unix.shell)