What does drwxr-sr-x mean?

Mujkanovic

Well-known member
Collaborate
Registered
Joined
Apr 24, 2016
Messages
424
Points
18
When I CHMOD a file in FPT client, it changed to this drwxr-sr-x or -rw-r--r--r or drwxr-xr-x. Can anyone tell me what the "drwxr" "sr" "x" "rw" or "r" means for a directory with the permissions?
 

LJSHost

Well-known member
Hosting Provider
Registered
Joined
Jul 5, 2016
Messages
1,031
Points
63
d = directory
r = read able
w = writable
x = executable
s = setuid bit, which tells the OS to execute that program with the userid of its owner

-rwxr--r--r means read write and execute permissions for the owner read for the group and read for other users.
 

MooseLucifer

Well-known member
Registered
Joined
May 20, 2016
Messages
149
Points
28
The letters "drwxr" in the file permissions represent the type of the file and its permissions. Here is what each letter represents:
  • "d" - indicates that the item is a directory.
  • "r" - indicates that the owner of the file has permission to read the file.
  • "w" - indicates that the owner of the file has permission to write (modify) the file.
  • "x" - indicates that the owner of the file has permission to execute the file or access the directory.
The next three characters (e.g. "sr-") represent the permissions for the group that the file belongs to. The permissions are represented in the same way as for the owner of the file (r, w, x).

The final three characters (e.g. "x") represent the permissions for others, who are not the owner or part of the group.

Here are some examples of how the file permissions can be used:
  1. Setting permissions for a web directory: In a web server, you might want to set the permissions of the web root directory (e.g. public_html) to "drwxr-xr-x". This will allow the web server to access the files and serve them to visitors, while still protecting the files from unauthorized access.
  2. Securing sensitive files: If you have sensitive files, like password files or configuration files, you might want to set the permissions to "-rw-------". This will prevent anyone else from reading the files, even if they have access to the server.
  3. Sharing files with a group: If you have a group of people who need to access a set of files, you can set the permissions to "rwxrwx---". This will allow members of the group to read, write, and execute the files, while others will not be able to access the files.
  4. Executing a shell script: If you have a shell script that you want to be able to execute, you might set the permissions to "rwxr-xr-x". This will allow the owner of the script to read, write, and execute the script, while others will only be able to execute the script.
These are just a few examples of how file permissions can be used. The exact permissions you set will depend on your specific needs and requirements.
 
Newer Threads
Latest Threads
Replies
0
Views
48
Replies
0
Views
189
Replies
0
Views
85
Replies
0
Views
81
Recommended Threads
Replies
0
Views
1,437
Replies
5
Views
2,699
Replies
0
Views
1,165

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top