[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: External hard disk mounted as root only



Am Sonntag 07.04.2013, 19:29:38 schrieb Adriano Vilela Barbosa:
> > Am Sonntag 07.04.2013, 08:20:27 schrieb Adriano Vilela Barbosa:
> > > Hello all,
> > > 
> > > I'm having a mounting problem with an external USB disk I just bought.
> > > I googled this up a lot, but couldn't really find a solution.
> > 
> > Which file systems do you use for the HD and jump drive (whatever that
> > is)? When they are mounted, could you just execute mount and post the
> > relevant parts of the output?
> > 
> >   --Reinhold
> 
> Hello,
> 
> Thanks for your response. By jump drive I simply mean a USB flash
> drive (http://en.wikipedia.org/wiki/USB_flash_drive). Mine is using
> fat32. The external USB disk has two partitions: one is using HFS+
> (with journaling disabled) and the other one is using ext4.

This'll probably be so much easier than you'd expect...

> Here's the output of 'ls -lh' executed in my /media directory:
> 
> adriano@vaio:/media$ ls -lh
> total 24K
> drwx------ 4 adriano adriano  16K Dec 31  1969 B192-20DE
> lrwxrwxrwx 1 root    root       6 Aug  2  2009 cdrom -> cdrom0
> drwxr-xr-x 2 root    root    4.0K Aug  2  2009 cdrom0
> drwxr-xr-x 3 root    root    4.0K Apr  6 20:34 Linux
> drwxr-xr-x 1 root    root       8 Apr  6 20:47 MacOSX
> 
> The flash drive is mounted on /media/B192-20DE, the HFS+ partition of
> the external USB disk is monted on /media/MacOSX, and the ext4
> partition on /media/Linux. Notice how /media/B192-20DE is owned by
> adriano (which is me) whereas the partitions on the external USB drive
> are owned by root.

This is pretty much what I would expect. FAT doesn't know users, so it is 
mounted as your current user. Ext4 knows users and the user information is 
carried across mounts. IOW, for the ext4 partition, you simply need to run 
"chmod -R adriano:adriano /media/Linux" as root, and it should then be owned 
by your user across mounts (at least that is how it works for me).

I'm not exactly sure about the HFS+ partition as I have no experience with it. 
Does it support user/group information in a way that Linux can use? (I'm 
hoping yes, since OS X is a Unix.) If so, you could try creating a 
subdirectory, chown it to your user and see whether the information is kept 
across mounts. Or, you could simply make the whole partition world-writable.

<snip>

> Thanks for your help,

No problem.

  --Reinhold


Reply to: