6

In the / directory, I use:

ls -alFd /tmp  

to check the /tmp directory permissions and I get drwxrwxrwt.

I know rwxrwxrw means user, group, other permissions are read, write and execute.

But I don't know the meaning of the d and t. of the drwxrwxrwt, can someone explain it?

terdon
  • 242,166

2 Answers2

7

The d letter means it's a directory (a folder if you prefer that name). The t letter means that file is 'sticky'. Only the owner and root can delete a sticky file.

You may want to take a look at this page if you want to know more about the sticky file permission.

Calabacin
  • 290
3

As explained in Understanding Linux File Permissions

Advanced Permissions

The special permissions flag can be marked with any of the following:

  • _ - no special permissions
  • d - directory
  • l - The file or directory is a symbolic link
  • s - This indicated the setuid/setgid permissions. This is not set displayed in the special permission part of the permissions display, but is represented as a s in the read portion of the owner or group permissions.
  • t - This indicates the sticky bit permissions. This is not set displayed in the special permission part of the permissions display, but is represented as a t in the executable portion of the all users permissions
Yaron
  • 4,289
  • I believe s is shown in the "executable" position. There's also S (capital), which means setuid / setgid but without the corresponding execute permission. Similarly there's T (capital), which means sticky without the corresponding execute permission. Then there's p, which means "named pipe". – Satō Katsura May 18 '17 at 09:28