File Creation Troubleshooting
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. Welcome back to
00:00
the Linux Plus course here at Cybrary.
00:00
I'm your instructor Rob Goelz.
00:00
In today's lesson, we're going to be talking
00:00
about file creation issues.
00:00
Upon completion of this lesson,
00:00
you're going to be able to understand
00:00
the types of file creation issues that
00:00
a user may experience and determine
00:00
if the issue is related to quotas,
00:00
inode exhaustion, issues with the file permissions,
00:00
or something weird like immutable files.
00:00
We're going to use some tools to troubleshoot
00:00
file creation issues, such as repquota,
00:00
df, and the list command.
00:00
Users can run into a lot of issues when creating files,
00:00
beyond just the file and directory permissions.
00:00
We might also see problems with
00:00
quotas or inode exhaustion.
00:00
There's quite a few things we can run into
00:00
when we're having file creation issues.
00:00
Now first of all, file quota issues
00:00
are sometimes a cause of
00:00
>> file creation issues for users.
00:00
>> We talked about quotas back in Module 8.
00:00
Just as a refresher,
00:00
we can check for quota issues by first
00:00
checking the /etc/fstab file
00:00
and looking on the entry there for
00:00
the line user quota or repquota.
00:00
If that's specified, it means
00:00
that that partition or mount point has quotas enabled.
00:00
Alternatively, we could use
00:00
the repquota command and we can use
00:00
repquota dash a to show all filesystem quotas,
00:00
that dash a shows all filesystem quotas.
00:00
If we wanted to, we can check
00:00
a user's quota limits with the quota command.
00:00
We can use quota dash u, username,
00:00
and see if that user is reaching their quota.
00:00
Now filesystem space issues
00:00
and inode exhaustion or
00:00
other issues that users encounter.
00:00
Filesystem space issues are
00:00
particularly something you'll see a lot, unfortunately.
00:00
Luckily for us though, the same command is used to
00:00
check and troubleshoot
00:00
filesystem space and inode exhaustion.
00:00
That's the df command which we've seen before.
00:00
Now, by itself, df is just going to present
00:00
a summary output of
00:00
all the filesystem space used and what's available.
00:00
But we can use df dash i,
00:00
the i option, to display the same thing,
00:00
>> but for inodes.
00:00
>> Now we've already discussed file and
00:00
directory permissions issues in this module,
00:00
but this is also a common file creation issue.
00:00
We can use the list command.
00:00
We can use ls dash al to
00:00
check file and directory permissions.
00:00
Then if we find issues,
00:00
we can use change mode,
00:00
chmod or change ownership,
00:00
chown to fix those issues.
00:00
Now, of particular note are immutable files.
00:00
These are weird little things.
00:00
They are files that are configured with
00:00
an attribute set that no one can delete the files.
00:00
These immutable files can be seen
00:00
>> when we run the lsattr command.
00:00
>> So we could do that lsattr and then specify the file,
00:00
>> and we'll see that little i there then
00:00
>> indicates that this file is immutable.
00:00
Now we can either set or remove this by using
00:00
the change attribute or chattr command.
00:00
For example, if we wanted to set
00:00
that immutable attribute we see on file 1,
00:00
we would say sudo change attribute,
00:00
chattr plus i, and then file 1.
00:00
If we want to remove that immutable
00:00
attribute we see above,
00:00
we would do sudo chattr minus i on file 1,
00:00
and that will remove the i that we see.
00:00
In this lesson, we covered the types of
00:00
file creation issues a user is likely to experience,
00:00
and then how to determine if
00:00
a file creation issue is related to quotas,
00:00
inode exhaustion, or issues
00:00
with permissions such as immutable files.
00:00
We also saw how we can use tools, such as
00:00
repquota, quota, df,
00:00
ls, lsattr,
00:00
and chattr to troubleshoot file creation issues.
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