Troubleshoot File and Directory Permissions
Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
Required fields are marked with an *
or
Already have an account? Sign In »

Video Transcription
00:00
>> Hey there Cybrarians,
00:00
welcome back to the Linux plus course here at Cybrary.
00:00
I'm your instructor Rob Goelz and in today's lesson,
00:00
we're going to be talking about file
00:00
and directory permission issues.
00:00
Upon completion of today's lesson,
00:00
you're going to be able to understand the types
00:00
of file and directory permissions issues that
00:00
a user is going to be likely
00:00
to encounter and we're going to see
00:00
tools that we can use to
00:00
troubleshoot and resolve these types of issues.
00:00
Users often run into
00:00
file permission issues any time that
00:00
they trying to open or modify a file.
00:00
To troubleshoot file permission issues,
00:00
we can view permissions
00:00
using our old friend the list command.
00:00
We can use ls-al.
00:00
Now that's going to display
00:00
the user and group ownership of the file,
00:00
and we can check the UGO and RWX
00:00
permissions on the file as well by using ls-al.
00:00
Next, we might want to check
00:00
the user group membership using the id command,
00:00
and if a user needs to be added
00:00
to the group that they're not in,
00:00
we can add the user using usermod.
00:00
If a user is not an owner of a file but should be,
00:00
we can make them the owner,
00:00
and we can use the chown command,
00:00
change owner, chown command.
00:00
Now, users can hit directory permission issues
00:00
as well as file issues when they're trying to read,
00:00
write, copy or access files in a directory.
00:00
The steps to troubleshoot file permissions are
00:00
the same for directory permissions for the most part,
00:00
but we can run ls-ld and
00:00
that will give us the permissions on the directory.
00:00
Now, once we've done that,
00:00
we're going to want to do the same thing.
00:00
We're going to want to check user and
00:00
group ownership of the directory and we're going
00:00
to want to check UGO/RWX permissions
00:00
on the directory as well.
00:00
But keep in mind the RWX permissions for
00:00
the directory are a little bit
00:00
different than what we saw for files.
00:00
Example, the R permission
00:00
is to view the directories files.
00:00
Read or view the files.
00:00
But the write command is to create,
00:00
move, modify, and remove files in a directory.
00:00
It's not just writing, it's doing a lot of things.
00:00
Then the execute or x permission is used to
00:00
change into a directory with a cd command.
00:00
This is why a lot of times on
00:00
directories you may see the octal notation 755
00:00
because that gives the group and
00:00
other the permissions to read and execute,
00:00
which is really just to change into
00:00
that directory to see the files inside the directory.
00:00
Now just like we saw with the previous slide,
00:00
we can resolve issues with chown and
00:00
chmod as needed and appropriate.
00:00
With that, we've reached the end of this lesson.
00:00
In this lesson, we covered the file and
00:00
directory permissions issues that
00:00
a user is likely to encounter,
00:00
and then we saw some of the tools that we can use to
00:00
identify or resolve these types of issues.
00:00
For example, we can use the list commands,
00:00
ls-al for file permissions or
00:00
ls-ld for directory permissions to view those,
00:00
and if we need to change file or directory ownership,
00:00
we can do that with the change owner or
00:00
chown command and we can change
00:00
file or directory permissions with
00:00
change mode or chmod command as I like to call it.
00:00
Thanks so much for being here and I look
00:00
forward to seeing you in the next lesson.
Up Next
Instructed By
Similar Content