LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 10-28-2016, 07:52 AM   #1
vargathon
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, 08:51 AM   #2
vargathon
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, 09:20 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,463
Blog Entries: 10

Rep: Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639Reputation: 1639
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:
Code:
$ 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:
Code:
$ 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".
Code:
$ 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, 09:45 AM   #4
snowpine
Senior Member
 
Registered: Feb 2009
Posts: 4,131

Rep: Reputation: 1155Reputation: 1155Reputation: 1155Reputation: 1155Reputation: 1155Reputation: 1155Reputation: 1155Reputation: 1155Reputation: 1155
Required reading: https://wiki.archlinux.org/index.php...and_attributes

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

Rep: Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741Reputation: 741
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
Code:
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, 10:30 AM   #6
pressman57
Member
 
Registered: Feb 2005
Location: Escondido Ca.
Distribution: Arch
Posts: 87

Rep: Reputation: 21
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.
  


Reply


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 09:12 AM
change permissions of the second hard drive jmding Linux - Hardware 6 12-19-2006 04:42 PM
Why Will ubuntu not let me access my internal hard drive on my laptop? linuxuser2003 Ubuntu 3 03-18-2006 02:15 AM


All times are GMT -5. The time now is 11:28 AM.

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