chmod 774 hashcat.hcstat Looking at Table 5-1, we can see that this statement gives the owner all
permissions, the group all permissions, and everyone else (other) only the
read permission.
Now we can see whether those permissions have changed by running
ls -l on the directory and looking at the hashcat.hcstat line. Navigate to the
directory and run that command now:
kali >
ls -l total 32952
drwxr-xr-x 5 root root 4096 Dec 5 10:47 charsets
u
-rwxrwxr-- 1 root root 33685504 June 28 2018 hashcat.hcstat
-rw-r--r-- 1 root root 33685504 June 28 2018 hashcat.hctune
drwxr-xr-x 2 root root 4096 Dec 5 10:47 masks
drwxr-xr-x 2 root root 4096 Dec 5 10:47 OpenCL
drwxr-xr-x 3 root root 4096 Dec 5 10:47 rules
You should see
-rwxrwxr--
on the left side of the hashcat.hcstat line
u
.
This confirms that the
chmod
call successfully changed permissions on the
file to give both the owner and the group the ability to execute the file.
Changing Permissions with UGO Although the numeric method is probably the most common method for
changing permissions in Linux, some people find
chmod
’s symbolic method
more intuitive—both methods work equally well, so just find the one that
suits you. The symbolic method is often referred to as the UGO syntax,
which stands for user (or owner), group, and others.
UGO syntax is very simple. Enter the
chmod
command and then the users
you want to change permissions for, providing
u
for user,
g
for group, or
o
for
others, followed by one of three operators:
- Removes a permission
+ Adds a permission
= Sets a permission
After the operator, include the permission you want to add or remove
(
rwx
) and, finally, the name of the file to apply it to.
Controlling File and Directory Permissions
55 So, if you want to remove the write permission from the user that the
file hashcat.hcstat belongs to, you could enter the following:
kali >