-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChmod-calc.mw
74 lines (63 loc) · 1.86 KB
/
Chmod-calc.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{{Header}}
{{title|title=
chmod-calc
}}
{{#seo:
|description=Comprehensive File and Directory Inspection Tool
|image=Calc-23123.jpg
}}
[[File:Calc-23123.jpg|thumb]]
{{intro|
Comprehensive File and Directory Inspection Tool
}}
== SYNOPSIS ==
<code>chmod-calc <file_path></code>
== DESCRIPTION ==
<code>chmod-calc</code> is a comprehensive file and directory inspection tool that consolidates various Linux command functionalities into a single utility. It displays detailed information about a file or directory, including:
* Basic permissions (Owner, Group, Public)
* Octal representation of permissions
* File type (Regular File, Directory, Symlink, Hardlink, etc.)
* Owner and group information
* Access Control Lists (ACLs) status
* Extended attributes (xattr) status
* Linux capabilities (<code>getcap</code>)
* Immutable attribute (<code>chattr +i</code>)
* File size and link count
* Special attributes (SUID, SGID, Sticky Bit)
* Hidden file detection
== RETURN VALUES ==
* <code>0</code> Successfully retrieved and displayed file information.
* <code>1</code> File not found or an error occurred.
== EXAMPLE ==
Run <code>chmod-calc</code>.
<u>Note:</u> replace <code>./example_file</code> with the actual path to the file or folder.
{{CodeSelect|code=
chmod-calc ./example_file
}}
Sample output:
<pre>
Permissions for: ./example_file
Type: Regular File
Owner: user Group: user
Octal Permissions: 644
File Size: 123 bytes
Link Count: 1
Hidden File: No
ACLs: none
Extended Attributes: none
Capabilities: None
Immutable (chattr +i): No
Category Read Write Execute
Owner Yes Yes No
Group Yes No No
Public Yes No No
Special Attributes:
SUID: Not Set
SGID: Not Set
Sticky Bit: Not Set
</pre>
= SOURCE CODE =
* https://github.com/Kicksecure/helper-scripts/blob/master/usr/bin/chmod-calc
<references/>
{{Footer}}
[[Category: Documentation]]