Re: USB ownership
Hans Ekbrand wrote:
> On Fri, Oct 17, 2008 at 04:57:00PM +0200, Jochen Schulz wrote:
>> Paul Cartwright:
>> > My wife plugged in a USB stick, to save a file to it. It would not let
>> > her save a file, permission denied.
>> > I am logged in first, vt7, she is logged in 2nd, vt8, and when I
>> > switched to my login, there was the disk window open ( /media/disk).
>> I don't know what Debian's current default solution for auto-mounting
>> is, but the problem is that this program simply cannot tell who of you
>> is using the USB drive.
> I don't the last part of this sentence is accurate. Only one VT is
> current when the USB-stick is inserted, the automounter should use the
> policy: The user who own the VT which is active when the USB-stick is
> inserted gets write permission on it.
It's not VT dependant - I tried to post the solution but don't see it here,
may be got too long
for this you have to use the 'users' mount option or put it in the fstab for
the particular device
I suggested to use device by uuid
auto users,noauto,atime,rw,nodev,noexec,nosuid 0 0
and it works for every user