Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-28-2016, 06:52 AM   #1
LQ Newbie
Registered: Oct 2016
Posts: 2

Rep: Reputation: Disabled
Arch Linux: How to get access to my internal hard drive? Can't change permissions.

Hello. I have tried to use Arch for some time now, but I'm a total newbie in many areas. I have tried to google this problem for many hours now without any success so hopefully someone will help out

I'm running Arch Linux (specifically Antergos with default Gnome desktop).

The drive/partition I'm trying to access is /dev/sdc4. Let's assume my login username is Person. I formatted the partition as ext4 using GParted.

When I'm at file explorer and look at the Permissions tab, it says I don't own it and that I don't have the rights to change permissions.

I want the partition ( /dev/sdc4 ) to be fully accessible for the user Person.

Would someone give me the commands to copy-paste to terminal to make this happen? I would be very grateful
Old 10-28-2016, 07:51 AM   #2
LQ Newbie
Registered: Oct 2016
Posts: 2

Original Poster
Rep: Reputation: Disabled
Also to be clear, those "similar threads" below my post give me no answers at all So I really do need the commands or very clear advice.
Old 10-28-2016, 08:20 AM   #3
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,883
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Hi and Welcome to LQ!

GParted will make the partition as you've done, you also need to make a file system.

Since you're using ext4, the command you'd want to use would involve being root or using the sudo command:
$ sudo mkfs.ext4 /dev/sdc4
Once the file system is created, you need to mount it, typically you create a directory for mounting in the /media tree:
$ sudo mkdi /media/anyname
$ sudo mount -t ext4 /dev/sdc4 /media/anyname
This should mount the file system under /media/anyname. You can continue to use sudo to manipulate ownership and group. A good thing to check is to see what group the user "Person" is, typically this is also "Person". For instance if I make a user "frank", it typically also has a group "frank". My point there is the next set of command are to change the owner and group of the file system to match your user "Person".
$ cd /media/anyname
$ sudo chown -R Person *
$ sudo chgrp -R Person *
This changes recursively down sub-directories -R (not that you need it with a new file system and nothing yet under it), all file ownership (chown) to be owned by the user "Person", and next changes the group (chgrp) for all files in the file system to belong in the group "Person".

At this point you should be all set and files should be accessible by user Person.
Old 10-28-2016, 08:45 AM   #4
Senior Member
Registered: Feb 2009
Posts: 4,667

Rep: Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411Reputation: 1411
Required reading:

(See in particular the heading "Changing ownership")
Old 10-28-2016, 09:17 AM   #5
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,423

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
Let me try to clarify a few things.
If you want to have a directory (e.g. /home/Person) and everything in it writable by user Person in primary group Users the syntax is
chmod -r Person:Users /home/Person
You generally do not want the system to be writable by anyone except root, so the directory '/' should not be user writable for security reasons. Data directories under /home can be user writable. System directories (everything else in /) generally should not be. The only exception I have is a mount point for external drives, and that had to be set in /etc/fstab.

A simple google search finds all of this stuff for you, and you learn quicker if you dig it out yourself.
Old 10-28-2016, 09:30 AM   #6
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 118

Rep: Reputation: 29
You can have the partition mounted at boot with an /etc/fstab entry. For example:

/dev/sdc4 /media/anyname rw,auto,user 0 0

If the disk is a usb drive you probably should use a UUID number instead of /dev/sdc4. To find it type sudo blkid /dev/sdc4.
1 members found this post helpful.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Second Internal Hard drive detected but cannot access ryu Linux - Hardware 5 06-09-2012 08:12 AM
change permissions of the second hard drive jmding Linux - Hardware 6 12-19-2006 03:42 PM
Why Will ubuntu not let me access my internal hard drive on my laptop? linuxuser2003 Ubuntu 3 03-18-2006 01:15 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:53 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration