Peppermint | Linux OS Community Forum
 
It is currently Sun Sep 15, 2019 4:25 pm

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: changing ownership of newly formatted USB HDD [SOLVED]
PostPosted: Fri Feb 21, 2014 9:12 am 
Offline
User avatar

Joined: Wed Jan 01, 2014 7:40 pm
Posts: 116
Location: Amsterdam
Hi all, I'm having fun and games trying to change ownership of a Seagate 500GB external HDD. I've formatted it to ext4 using
Code:
mkfs.ext4 /dev/sdb1
I've then unmounted the volume and applied as root, not sudo;
Code:
chown andy /dev/sdb1
I've then tried to make a test dirrectory both as root and as user. The test as root worked but the test mkdir as user fail due to lack of permissions. This is the terminal output.

Code:
andy@andy-AMILO-Li3710 ~ $ sudo su
[sudo] password for andy:
andy-AMILO-Li3710 andy # fdisk -ls

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00088042

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    41943039    20970496   83  Linux
/dev/sda2        41943040    58722303     8389632   82  Linux swap / Solaris
/dev/sda3        58722304  1465147391   703212544   83  Linux

Disk /dev/sdb: 500.1 GB, 500107861504 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773167 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001dc7f

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048   976773119   488385536   83  Linux
andy-AMILO-Li3710 andy # chown andy /dev/sdb1
andy-AMILO-Li3710 andy # cd /media/andy/Storage-No1
andy-AMILO-Li3710 Storage-No1 # ls -l
total 20
drwx------ 2 root root 16384 feb 21 10:55 lost+found
drwxr-xr-x 2 root root  4096 feb 21 13:43 test
andy-AMILO-Li3710 Storage-No1 # mkdir test2
andy-AMILO-Li3710 Storage-No1 # ls -l
total 24
drwx------ 2 root root 16384 feb 21 10:55 lost+found
drwxr-xr-x 2 root root  4096 feb 21 13:43 test
drwxr-xr-x 2 root root  4096 feb 21 14:01 test2
andy-AMILO-Li3710 Storage-No1 # exit
exit
andy@andy-AMILO-Li3710 ~ $ cd /media/andy/Storage-No1
andy@andy-AMILO-Li3710 /media/andy/Storage-No1 $ mkdir test3
mkdir: cannot create directory ‘test3’: Permission denied
andy@andy-AMILO-Li3710 /media/andy/Storage-No1 $


I'm at a loss, I really don't know what I'm doing wrong. It looks fine to me. I've tried different USB ports on the lappie and the result is the same. Any help would be much appreciated.

_________________
Backup! Backup! Backup! If you're missing any of these, you ain't Backed Up!


Last edited by BiPolarBear on Sat Feb 22, 2014 4:05 pm, edited 1 time in total.

Top
 Profile  
 
 

 Post subject: Re: Problems changing ownership of newly formatted USB HDD
PostPosted: Fri Feb 21, 2014 9:52 am 
Offline
User avatar

Joined: Wed Jan 01, 2014 7:40 pm
Posts: 116
Location: Amsterdam
I think that this must be one the first times the GUI beats the CLI :o ! I tried and tried again to change ownership via the command line with no success. I thought, "damn it, I'll try doing it through PCmanFM as root". I altered the owner and group to andy, that's me if anyone is wondering who hell that is. Hit enter and eureka, I now have user permissions. I'd still like to know why the CLI didn't work though, Ill leave this as solution pending :lol: .

_________________
Backup! Backup! Backup! If you're missing any of these, you ain't Backed Up!


Top
 Profile  
 
 Post subject: Re: Problems changing ownership of newly formatted USB HDD
PostPosted: Sat Feb 22, 2014 10:45 am 
Offline
User avatar

Joined: Tue Apr 17, 2012 12:25 pm
Posts: 5521
Location: Cornwall, England
Command should have been:
sudo chown -R user:group /path/to/mountpoint
;)
(not /path/to/device)

so:
Code:
sudo chown -R andy:andy /media/andy/Storage-No1

_________________
Please be sure to sign up to the new Peppermint forum and post any new question there .. this forum will be made read-only on the 1st April 2014

You can read the announcement here:
http://peppermintos.net/viewtopic.php?f=6&t=6608
Or here's a direct link to the new forum:
http://forum.peppermintos.com


Top
 Profile  
 
 Post subject: Re: Problems changing ownership of newly formatted USB HDD
PostPosted: Sat Feb 22, 2014 4:03 pm 
Offline
User avatar

Joined: Wed Jan 01, 2014 7:40 pm
Posts: 116
Location: Amsterdam
Cheers for that, this has been added to my notes. The permissions structure that is possible in Linux is staggering when you think about it :D !

_________________
Backup! Backup! Backup! If you're missing any of these, you ain't Backed Up!


Top
 Profile  
 
 Post subject: Re: changing ownership of newly formatted USB HDD [SOLVED]
PostPosted: Sat Feb 22, 2014 5:47 pm 
Offline
User avatar

Joined: Tue Apr 17, 2012 12:25 pm
Posts: 5521
Location: Cornwall, England
You're not kidding ;)

_________________
Please be sure to sign up to the new Peppermint forum and post any new question there .. this forum will be made read-only on the 1st April 2014

You can read the announcement here:
http://peppermintos.net/viewtopic.php?f=6&t=6608
Or here's a direct link to the new forum:
http://forum.peppermintos.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by php B.B. © 2000, 2002, 2005, 2007 php B.B. Group
Template made by DEVPPL