LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   what does the "T" mean when you list file permissions w/ ls -l (https://www.linuxquestions.org/questions/linux-newbie-8/what-does-the-t-mean-when-you-list-file-permissions-w-ls-l-4175541037/)

doughyi8u 04-28-2015 03:01 PM

what does the "T" mean when you list file permissions w/ ls -l
 
I have a directory w/ a file that I created using:
Code:

fd = open("file", O_CREAT);
The file turned out to be executable. When I did a 'ls -l' on the directory w'/ that file it has a "T" at the end of the permissions where the executable bit would be set for the "other" group.

strick1226 04-28-2015 03:05 PM

It's the sticky bit.

jpollard 04-28-2015 08:53 PM

Quote:

Originally Posted by doughyi8u (Post 5354641)
I have a directory w/ a file that I created using:
Code:

fd = open("file", O_CREAT);
The file turned out to be executable. When I did a 'ls -l' on the directory w'/ that file it has a "T" at the end of the permissions where the executable bit would be set for the "other" group.

You have a bug in your code.

If you use "O_CREAT" flag to open, you must provide the mode flags to use for that file. Since you left it off you caused a stack overflow and the mode flags used were bogus.


All times are GMT -5. The time now is 06:50 AM.