This tutorial describes about Linux File Permissions and storage with Partition with complete Details.

Linux File Permissions

File and Directory Attributes
Unix/Linux files have 8 attributes that can be seen with is –l command
[root@techbrown~]# ls -l reports

Note : Only the owner or the root can change the permissions

Modifying the Permissions

Modifying the Permissions
[root@techbrown~]# chmod <permissions/weight> <file/directory>
Changing the ownership
Changing the ownership of a file or directory
[root@techbrown~]# chown <username:groupname> <file/dir>

Linux Partition

Partitioning Tools
Pre-installation tool
  • Disk Druid
Post-installation tools
  • Fdisk
  • Parted
View the List of Partitions
View the list of partitions
[root@techbrown~]# fdisk –l <device name>
Disk Management Using fdisk
Disk Management
[root@techbrown~]# fdisk <device name>
Disk Management
[root@techbrown~]# fdisk /dev/had

The number of cyliders for this disk is set to 4865.
There is nothing wrong with that, but this is larger than 1024, and couldin certain setups cause problems with:

  1. Software that runs at boot time (eg. , old version of LILO)
  2. Booting and partitioning software from other Oss (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help ) : m command action
a      toggle a bootable flag
d     delete a partition
m    print this menu
n     add a mew partition
p     print the partition table
q     quit without saving changes
w    write table to disk and exit

Updating the Partition table
updating the Partition table without restarting
[root@techbrown~]# partprobe <device name>
Formatting the partition using ext3 file system
[root@techbrown~]# mkfs.ext3 <partition>
Formatting the partition using vfat file system
[root@techbrown~]# mkfs. Vfat <partition>
Create a directory for mounting the partition
[root@techbrown~]# mkdir <directory name>
Mounting the partition on the directory created
[root@techbrown~]# mount <partition> <directory name>
Unmount the file system
[root@techbrown~]# umount <directory name>

That’s all for now.

How to Create and Edit User and Group on CentOS / RHEL

Previous article

How to Configure phpMyAdmin with MySQL Database on CentOS / RHEL

Next article

You may also like


Leave a reply

Your email address will not be published. Required fields are marked *

More in Linux