56
Chapter 5
drwxr-xr-x 7 root root 4096 Dec 5 11.17 Public
drwxr-xr-x 7 root root 4096 Dec 5 11.17 Templates
drwxr-xr-x 7 root root 4096 Dec 5 11.17 Videos
We can see
newhackertool at u, along with the
rest of the contents of the
root directory. We can see that our
newhackertool doesn’t have execute per-
mission for anyone. This makes it impossible to use. It might seem strange
that by default, Linux won’t let you execute a file you downloaded, but over-
all this setting makes your system more secure.
We can give ourselves permission to execute
newhackertool by
entering
the following:
kali >
chmod 766 newhackertool
Now, when we perform a long listing on the directory, we can see that
our
newhackertool has execute permission for the owner:
kali >
chmod 766 newhackertool
kali >
ls -l
total 80
--
snip--
drwxr-xr-x 7 root root 4096 Dec 5 11.17 Music
-rwxrw-rw- 1 root root 1072 Dec 5 11.17 newhackertool
drwxr-xr-x 7 root root 4096 Dec 5 11.17 Pictures
--
snip--
As
you now understand, this grants us (as the owner) all permissions,
including execute, and grants the group and everyone else only read and
write permissions (4 + 2 = 6).