Hans Ekbrand wrote:

> On Mon, Oct 20, 2008 at 05:06:25PM +0200, Emanoil Kotsev wrote:
>> 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
> 
> That's the problem. I wrote "should", all automounters that does not
> take the current VT into account is broken, INMHO.
> 
>> - 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
>> 
>> /dev/disk/by-uuid/3fca395b-d75d-44ab-98be-9ec05b2e45fd
>> /media/usb_2G_part3 auto users,noauto,atime,rw,nodev,noexec,nosuid 0 0
>> 
>> and it works for every user
> 
> As others have pointed out, your "solution" does not work for all
> usb-sticks (only those with a corresponding entry in /etc/fstab).
> 

You are right, but this is a quick fix. I also assume that if they exchange
one and the same usb drive the entry in /etc/fstab would fix at least their
problem.

The right way to  do it would be may be to change udev.

You say automounter should take into account who's owning the VT (I assume
this is for security reason and I agree) so again using a /etc/fstab entry
would be better solution then generally changing something into /etc/fstab

The alternative to use group was also discussed. But here again I don't know
what's better to do. For a usb drive it's indeed to have a somekind of
general rule, but it would impact other devices too may be. I'm thinking
most of the USB devices are read as sdX and applying a rule to it would
also impact scsi or s/pata devices

So my suggestion was consciously motivated and I did not come to a quicker
solution. Except this problem with the UUID in /etc/fstab not working for
me

regards

regards


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to