My TeX Live installation has a file called .texlive2015 and was originally set to drwx------T. I changed it, and I want to change it back, but I can't get the 'T' back. How do I get it back?

  • 1
    The t bit on a directory causes files created in it to be deletable by their owners instead of by the owner of the directory. For a directory that's only writable by its owner, that makes no difference. – Gilles 'SO- stop being evil' Sep 10 '15 at 23:03

This 'T' indicates the sticky bit. You can use something like chmod a+t to set it.

|improve this answer|||||

The T flag is a special version of the expected t. Usually t sits with execute x, but if the execute bit is not set for others then the t is flagged up as a capital.

touch f
chmod u=rwx,go=rx f    # "-rwxr-xr-x 1 roaima 0 Sep 10 23:13 f"
chmod +t f             # "-rwxr-xr-t 1 roaima 0 Sep 10 23:13 f"
chmod o-x f            # "-rwxr-xr-T 1 roaima 0 Sep 10 23:13 f"

chmod u=rwx,go=,+t f   # "-rwx-----T 1 roaima 0 Sep 10 23:13 f"
|improve this answer|||||
  • This one is good too. I just used the one below. – bev Sep 11 '15 at 23:35

Just use the permission bits.

chmoe 1700 f

The first bit 1 represents sticky bit, shows on execute permission bit on world is T

The following number 7, octal is 111, represents owner’s read write execute permission bit, which shows rwx

The following number 00, represents group and world read write execute permission bit, which shows - - - - - -

|improve this answer|||||
  • 1
    The danger of using the octal representations is if you use -R and remove the wrong permission from directories suddenly you can't traverse them no matter WHO you are. The chmod -R a-wx,og+rw syntax is safer in this case. – dragon788 Oct 11 '18 at 23:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.