Mounting on startup in 12.04

TopBot . topbot5 at googlemail.com
Tue Mar 18 02:35:59 UTC 2014


On Tue, Mar 18, 2014 at 1:44 AM, Nils Kassube <kassube at gmx.net> wrote:

> TopBot . wrote:
> > udisks --mount /dev/disk/by-label/Data
> >
> > It works great as a manual command in terminal but when i try to mount
> > the drive "Data" using the same command on startup by using the
> > command via rc.local, the data drive disappears from the side panel
> > and when I try to open it from /media/Data it says I do not have the
> > permissions to access content from the drive (which is not the issue
> > if i do it on normal basis)..
>
> The script rc.local is run by root at startup. Therefore root becomes
> the owner of the mounted drive if it is a FAT32 partition.


This is what I was thinking was happening.


> OTOH if you
> used a ext2/3/4 partition the permissions would be stored in the
> filesystem for the individual files and it would work as expected
> (except only root can unmount the disk). So if you always want to mount
> it as the same user, you can modify the command like this:
>
> su USER -c "udisks --mount /dev/disk/by-label/Data"
>
> Replace the "USER" appropriately.
>
>
> Nils
>
--
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

I guess that should work, I'll do that.

My case was that I do not want to do this permanently and do not want to
create backup versions of fstab, yet I want to disable this auto mount just
by removing or commenting the command which would be much easier (I guess?)
than editing fstab esp. in the cases when I'm setting the same up for some
one else (I find it easier to just go by label and add a single command). I
haven't edited fstab before, but if there's something equally simple for
that too, I would be open to that too.


Best,

-- 
TopBot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20140318/7ba9b931/attachment.html>


More information about the ubuntu-users mailing list