FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 06-22-2008, 10:38 AM
Daniel Dalton
 
Default mount partitions as normal user?

Hi,

When I mount a partition, I must use sudo, and when I create the
directory (the mount point) in /media I must also use sudo.
I chmod -R 777 the mount point directory before mounting, but... I must
use root to copy files and delete files from the drive.
So, how can I mount and have permission to delete, copy and move files
on my usb drive from my standard user account?

Thanks,

--
Daniel Dalton

http://members.iinet.net.au/~ddalton/
<d.dalton@iinet.net.au>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-22-2008, 10:44 AM
"Eugene V. Lyubimkin"
 
Default mount partitions as normal user?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daniel Dalton wrote:
> Hi,
>
> When I mount a partition, I must use sudo, and when I create the
> directory (the mount point) in /media I must also use sudo.
> I chmod -R 777 the mount point directory before mounting, but... I must
> use root to copy files and delete files from the drive.
> So, how can I mount and have permission to delete, copy and move files
> on my usb drive from my standard user account?
>
> Thanks,
>
You may add mount option "user[=<your_user>]" to /etc/fstab, then you will can to mount
partition as user.

- --
Eugene V. Lyubimkin aka JackYF, Ukrainian C++ developer.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIXi0NchorMMFUmYwRAmGQAKCICwN9FhKkdd80BDzZWd fwmtBz7wCePaT9
BTyY8FtYDYe0DWXuu0rbiJ8=
=r9ec
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-22-2008, 11:16 AM
Florian Kulzer
 
Default mount partitions as normal user?

On Sun, Jun 22, 2008 at 20:38:39 +1000, Daniel Dalton wrote:
> Hi,
>
> When I mount a partition, I must use sudo, and when I create the
> directory (the mount point) in /media I must also use sudo.
> I chmod -R 777 the mount point directory before mounting, but... I must
> use root to copy files and delete files from the drive.
> So, how can I mount and have permission to delete, copy and move files
> on my usb drive from my standard user account?

Install the "pmount" package and add your user to the "plugdev" group.
Then you can use the pmount command to mount pluggable devices and
pumount to unmount them again. The devices will be mounted under the
/media directory with proper ownership and permissions; you do not have
to create the mount point directories yourself. If your partitions on
the usb drive have filesystem labels then they will be mounted as
/media/LABEL; this is handy if you have more than one pluggable device.
(You don't have to remember in which order you plugged them in because
the order only influences the /dev/sd* assignment but not the FS
labels.)

If you have lines in /etc/fstab relating to pluggable devices then you
should comment them out as they sometimes keep pmount from working
properly. (The main point of pmount is that you do not have to add more
and more lines to /etc/fstab as you keep buying additional USB devices.)

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-22-2008, 01:00 PM
Mark Allums
 
Default mount partitions as normal user?

Daniel Dalton wrote:

Hi,

When I mount a partition, I must use sudo, and when I create the
directory (the mount point) in /media I must also use sudo.
I chmod -R 777 the mount point directory before mounting, but... I must
use root to copy files and delete files from the drive.
So, how can I mount and have permission to delete, copy and move files
on my usb drive from my standard user account?

Thanks,



GNOME users get this for free. Text users can login as root long enough
to edit fstab to allow this. Add mount option 'user' to the list of
mount options.


Mark Allums


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-22-2008, 04:39 PM
Mark Grieveson
 
Default mount partitions as normal user?

On Sun, 22 Jun 2008 11:33:25 +0000 (UTC)
debian-user-digest-request@lists.debian.org wrote:

> Hi,
>
> When I mount a partition, I must use sudo, and when I create the
> directory (the mount point) in /media I must also use sudo.
> I chmod -R 777 the mount point directory before mounting, but... I
> must use root to copy files and delete files from the drive.
> So, how can I mount and have permission to delete, copy and move files
> on my usb drive from my standard user account?
>
> Thanks,

Check what your /etc/fstab file says under options for
your usb drive and mount point. I think you'd only have to add "user",
and "rw" under the options category (IE, "noauto,user,rw"). Mine
reads:

/dev/sda1 /media/usb vfat noauto,user,rw 0 0

I have two other entries for other usb drives that I mount, those being:

/dev/sdb1 /media/usb2 vfat noauto,user,rw 0 0
/dev/sdc1 /media/usb3 vfat noauto,user,rw 0 0

The columns above are file system, mount point, type, options, dump,
pass.

"rw" is only needed, I think, if you wish to be able to write
immediately to the drive when making changes. For instance, removable
media usually are written to only upon unmounting the drive. This
initially confused me, when I was first using floppies, when I noticed
that work was not immediately saved to them, but rather all changes
occurred when I was done and unmounted the drive. To speculate, I
believe that some early programmers did not care to be delayed in their
work by the computer slowing down to save everything (in the midst of
these people's work), and decided it was best to just have the saving
stuff done at the end when they (the programmers) were finished with
their work.

I don't think you should have to change the permissions of the mount
point to mount something. Granted, to create a new mount point, or to
make changes to the /media directory, you need root access (or sudo,
I guess -- whatever the hell sudo is -- I'm still not sure), but any
user should be able to use the mount points. You will need root or
sudo access to edit your /etc/fstab file, though.

Anyway, good luck.

Mark

PS, wikipedia has some useful information on fstab.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-23-2008, 07:20 AM
Daniel Dalton
 
Default mount partitions as normal user?

On Sun, Jun 22, 2008 at 01:16:53PM +0200, Florian Kulzer wrote:
> On Sun, Jun 22, 2008 at 20:38:39 +1000, Daniel Dalton wrote:
> > Hi,
> >
> > When I mount a partition, I must use sudo, and when I create the
> > directory (the mount point) in /media I must also use sudo.
> > I chmod -R 777 the mount point directory before mounting, but... I must
> > use root to copy files and delete files from the drive.
> > So, how can I mount and have permission to delete, copy and move files
> > on my usb drive from my standard user account?
>
> Install the "pmount" package and add your user to the "plugdev" group.

That's what I did, its a nice package and does the job well, do I need
to use normal mount as root though if I want to run scripts and
programs?
For some reason I couldn't run a /bin/sh script on my external hard
drive when it was mounted with pmount.

Thanks for all the help though, I think this is the best solution.

--
Daniel Dalton

http://members.iinet.net.au/~ddalton/
<d.dalton@iinet.net.au>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-23-2008, 09:36 AM
Andrei Popescu
 
Default mount partitions as normal user?

On Sun, Jun 22, 2008 at 08:38:39PM +1000, Daniel Dalton wrote:
> Hi,
>
> When I mount a partition, I must use sudo, and when I create the
> directory (the mount point) in /media I must also use sudo.
> I chmod -R 777 the mount point directory before mounting, but... I must
> use root to copy files and delete files from the drive.
> So, how can I mount and have permission to delete, copy and move files
> on my usb drive from my standard user account?

I have these two entries in /etc/fstab for my external drive:

LABEL=mirror /media/mirror ext3 defaults,noatime,user,data=journal 0
LABEL=Elements /media/xbig vfat uid=amp,noatime,user,fmask=133 0

My user is member of 'plugdev' group and I use

pmount LABEL=mirror
pumount mirror

(~/mirror is a symlink to /media/mirror)

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 
Old 06-23-2008, 04:48 PM
Florian Kulzer
 
Default mount partitions as normal user?

On Mon, Jun 23, 2008 at 17:20:34 +1000, Daniel Dalton wrote:
> On Sun, Jun 22, 2008 at 01:16:53PM +0200, Florian Kulzer wrote:
> > On Sun, Jun 22, 2008 at 20:38:39 +1000, Daniel Dalton wrote:
> > > Hi,
> > >
> > > When I mount a partition, I must use sudo, and when I create the
> > > directory (the mount point) in /media I must also use sudo.
> > > I chmod -R 777 the mount point directory before mounting, but... I must
> > > use root to copy files and delete files from the drive.
> > > So, how can I mount and have permission to delete, copy and move files
> > > on my usb drive from my standard user account?
> >
> > Install the "pmount" package and add your user to the "plugdev" group.
>
> That's what I did, its a nice package and does the job well, do I need
> to use normal mount as root though if I want to run scripts and
> programs?
> For some reason I couldn't run a /bin/sh script on my external hard
> drive when it was mounted with pmount.

That is probably due to the drive being mounted "noexec" by default (as
a security measure against scripts and programs on untrusted media).

I think you can use

pmount -e ...

to override the default and mount the drive with "exec" enabled.

--
Regards, | http://users.icfo.es/Florian.Kulzer
Florian |


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 06-23-2008, 08:55 PM
Paul Johnson
 
Default mount partitions as normal user?

On Sun, 2008-06-22 at 08:00 -0500, Mark Allums wrote:
> Daniel Dalton wrote:
> > Hi,
> >
> > When I mount a partition, I must use sudo, and when I create the
> > directory (the mount point) in /media I must also use sudo.
> > I chmod -R 777 the mount point directory before mounting, but... I must
> > use root to copy files and delete files from the drive.
> > So, how can I mount and have permission to delete, copy and move files
> > on my usb drive from my standard user account?
> >
> > Thanks,
> >
>
> GNOME users get this for free.

Not quite. If I plug something in that isn't in fstab, I get a gnome
error back.

--
Paul Johnson
baloo@ursine.ca
 

Thread Tools




All times are GMT. The time now is 12:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org