[GLLUG] Adding secondary hard drive to desktop
Jonathan Billings
billings at negate.org
Sun Feb 3 20:41:11 EST 2013
On Prickle-Prickle, the 34th of Chaos, 3179 , Ben Chavez said:
> O.k time to call for help again.
> I just added a secondary hard drive to my desktop running Ubuntu
> 12.04 and I would like to mount the drive a boot time
>
> I modified */etc/fstab* and the drive is mounted but for some reason
> I cant get control over the content, I cant modify files or create
> directories in it.
>
> This is the line I added
> *UUID=4f07995e-21bb-468d-8aaa-282510936bc3 /home/ben2/Public/shares
> ext4 defaults 0 0*
>
> I had prebiously add it with the following syntax
> */dev/sdb5/ /home/ben2/Public/shares ext4 gid=100,uid=1001,auto
> noatime 0 0**
It sounds like your prior experience was with setting up dumb
filesystems like fat32 as a mountpoint, and making the content
available to a normal user.
Unlike less featureful filesystems like fat32, ext4 has the full unix
permissions model, which means that when you mount it, just mount it
with 'defaults' (or you can add 'noatime' if you don't care about
recording atime modifications).
Then, after it's mounted, you need to set up the permissions. Since I
assume your userid is 'ben2', and your group ID is 1001, just run:
chown -R ben2:1001 /home/ben2/Public/shares
This will change the ownership to your userid and group for the files
and directories in the new mountpoint. It's now like they're files
and directories you'll find elsewhere in your homedir.
--
Jonathan Billings <billings at negate.org>
More information about the linux-user
mailing list