LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Permissions (Setuid, Setgid, etc) Please help (https://www.linuxquestions.org/questions/linux-general-1/permissions-setuid-setgid-etc-please-help-33188/)

MelLinux 10-18-2002 10:44 PM

Permissions (Setuid, Setgid, etc) Please help
 
hey guys, I want to know when to use the UPPER CASE T, and the Lower Case t. Finally, how do I know that those permissions are set for a File or a Directory:

Examples:
1777 = rwxrwxrwt
from here can you tell if it is a File or directory?, and does it matter if I use t or T?, when do I put the D or F in front of the permissions?


7777 = rwsrwSrwt
Am I correct?
again, why t or T?

Thanks

neo77777 10-18-2002 11:33 PM

Wasn't it asked before? I guess I never returned to the thread, but please keep the question in one thread, let's not create chaos :)
First part:
Q. How would you know if the file is the file or a directory ( everything in *NIX is a file be it a character device, block device, directory or a regular file)?
A. Easy if the permission theme starts with
- - a regular file
d - a directory
c - a charcter device
b - block device
p - named pipe
Did I forget anything?
Part two:
I don't know whether there is a difference between s and S or t and T, I assume none since I haven't notice it
s - in owner feilds means suid
s - in group fields means guid
t - is a sticky bit
As for suid and guid they are used to allow a non-owner or non-group member to interact with a file in context of owner or group respectively. A sticky bit is usually set on directories such as /tmp where different users can have access to read/write/execute and their files stay immune from each other, meaning that if user A has a file with rwx permissions set to himself in such a dir that only he may read/write and execute the file, the difference between users home directory and /tmp is that in user's home only user and members of his/her group if set are allowed to modify files if the perms set so, in /tmp any user is allowed to create files, but only owners and group preserve permission to manipulate files. The aforementioned is void for root - root has no restrictions on filesystem, this point was raised by MasterC in a recent thread and turned out that encription can keep root off user's files.
I hope it is clear, if not search here there were quite discussions about permissions and their interpretation.


All times are GMT -5. The time now is 11:30 AM.