Fixing permissions for a mdadm RAID 1 drive.


Recommended Posts

Hi guys. I created a RAID 1 Drive using mdadm on my Centos 7 machine. I made it using root so I don't have permissions for my user. 

 

[ahmed@arkan mnt]$ ls -al
total 4
drwxr-xr-x.  3 root root   23 Apr 14 22:51 .
dr-xr-xr-x. 18 root root  269 Apr 15 09:44 ..
drwxr-xr-x.  3 root root 4096 Apr 14 22:52 raid_data
[ahmed@arkan mnt]$ cd raid_data/
[ahmed@arkan raid_data]$ ls
lost+found  tecmint.txt
[ahmed@arkan raid_data]$ ls -al
total 24
drwxr-xr-x. 3 root root  4096 Apr 14 22:52 .
drwxr-xr-x. 3 root root    23 Apr 14 22:51 ..
drwx------. 2 root root 16384 Apr 14 22:50 lost+found
-rw-r--r--. 1 root root    20 Apr 14 22:52 tecmint.txt

Please advice me to fix it.

 

Thanks,

Link to comment
Share on other sites

  • 2 weeks later...

You either have to chown to the directory, add your user to the root group or chmod.

I`d do the first one by issuing the following commands:

[ahmed@arkan mnt]$ su -
[ahmed@arkan mnt]$ (put your root password here)
[ahmed@arkan mnt]$ chown ahmed:ahmed raid_data
[ahmed@arkan mnt]$ exit

Then try to navigate or create folders in it, should be fine.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.