Drive permissions

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
pfd27
Level 2
Level 2
Posts: 90
Joined: Sun Feb 15, 2015 11:13 am

Drive permissions

Post by pfd27 » Mon Feb 15, 2016 12:32 am

Hello

I think I likely did a newbie stupid< but I added a second 3tb drive to a new installation formatted to ext4. It is being mounted with the owner as root.
How do I change the permissions allow me full access?

User avatar
WharfRat
Level 21
Level 21
Posts: 13442
Joined: Thu Apr 07, 2011 8:15 pm

Re: Drive permissions

Post by WharfRat » Mon Feb 15, 2016 12:51 am

Root always owns newly formatted disks because root is the only one allowed to do that.

Mount the partition to a folder, for instance /media/newdisk then change the filesystems owner with

Code: Select all

sudo chown $USER:$USER /media/newdisk
ImageImage

tenfoot
Level 6
Level 6
Posts: 1009
Joined: Sun Jun 03, 2007 4:12 am
Location: Waipapa, Bay of Islands, New Zealand

Re: Drive permissions

Post by tenfoot » Mon Feb 15, 2016 3:37 pm

I logged in this morning specifically to ask the same question :)

So, thank you pht27 for asking and Wharfrat for giving the answer :lol:

Once again, we have a very happy geriatric: :D
tenfoot
"Light thinks it travels faster than anything but it is wrong. No matter how fast light travels, it finds darkness always got there first, and is waiting for it." Terry Pratchett (Reaper Man)

User avatar
pfd27
Level 2
Level 2
Posts: 90
Joined: Sun Feb 15, 2015 11:13 am

Re: Drive permissions

Post by pfd27 » Tue Feb 16, 2016 6:48 pm

Thanks for the reply. I ended up booting as root and changed the permissions that way.

User avatar
beachgardener
Level 3
Level 3
Posts: 122
Joined: Sun Sep 19, 2010 10:22 pm
Location: Australia

Re: Drive permissions

Post by beachgardener » Fri Apr 08, 2016 4:29 am

Ok I have found a thread that relates to what I need to do, but having trouble understanding the above posts and what to do, the way I understand it this should be a simple gui way of doing things.

I have LinuxMint 17.3 Cinnamon 64bit installed to sda, sdb is a 2Tb disk formatted ext4, I do understand from above posts that it is likely that root owns that disk. When I try to mount it in file manager it says I don't have the necessary permissions. I have been looking at where I can change this but not found things I can understand yet. I did join groups disk, but no luck.
Can someone please help me with getting the permissions changed on the 2Tb disk called Data so it can be mounted in file manager at anytime via mouse click?
Thank you.
Linux Mint 17.3 Cinnamon - 64bit

User avatar
WharfRat
Level 21
Level 21
Posts: 13442
Joined: Thu Apr 07, 2011 8:15 pm

Re: Drive permissions

Post by WharfRat » Fri Apr 08, 2016 9:54 am

beachgardener,

I would recommend not using the disks application. Instead mount it using mount:

Code: Select all

sudo mkdir /media/data
Replace the '?' here with your partition's designation - if it's one partition then it will be sdb1

Code: Select all

sudo mount /dev/sdb? /media/data 
Then change the owner - this is done only this one time

Code: Select all

sudo chown $USER:$USER /media/data
Later to have it mount during bootup add this to /etc/fstab

Code: Select all

UUID=-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx 	/media/data	ext4		defaults,errors=remount-ro,user,noatime	0 2
Get your UUID with

Code: Select all

sudo blkid /dev/sdb1|awk '{print $3}'|tr -d '"'
ImageImage

User avatar
beachgardener
Level 3
Level 3
Posts: 122
Joined: Sun Sep 19, 2010 10:22 pm
Location: Australia

Re: Drive permissions

Post by beachgardener » Sat Apr 09, 2016 3:52 am

WharfRat, thank you for that, looks like can understand that. I will get onto in the morning and report back my results.
Cheers.
Linux Mint 17.3 Cinnamon - 64bit

User avatar
beachgardener
Level 3
Level 3
Posts: 122
Joined: Sun Sep 19, 2010 10:22 pm
Location: Australia

Re: Drive permissions

Post by beachgardener » Mon Apr 11, 2016 5:11 am

Thank you WharfRat, i typed those in manually to get the hang of it and it worked as you said, much appreciated.

I have copied the instructions and kept a text file for future use, I don't know If the drive needs to be mounted at boot, but good to have that information as well.

Cheers, regards beachgardener
Linux Mint 17.3 Cinnamon - 64bit

Post Reply

Return to “Newbie Questions”