euglug.org

[작성자:] admin

  • [Eug-lug] user write access to /mnt/??



    Mr OSun Apr 23 12:45:28 PDT 2006

    That's much more along the lines of what is needed. As I stated
    before, I'm avoiding fstab because I plug in multiple devices
    and the first USB is always /dev/sdb so I prefer manual control
    of the mount point. I have three USB keys, card reader, external
    hard drive, and phone that need to be interchangeable on the fly
    and/or cope with more than one being plugged in. Thus, fstab is
    more hassle in that case. What if /mnt/camera is usually
    /dev/sdb1 but I have a key in already mounted at /mnt/usbkey?
    /dev/sdc wouldn't autoconfigure to /mnt/camera via fstab. 
    
    FWIW, this is Gentoo running Fluxbox. Ubuntu on the laptop
    handles things fine via all the automount crap. 
    
    That be all,
    Mr O.
    
    --- Jacob Meuser <jakemsr at jakemsr.com> wrote:
    
    > On Sun, Apr 23, 2006 at 10:41:22AM -0700, Allen Brown wrote:
    > > Mr O wrote:
    > > >The trouble is root can do it all. I'm not looking to add
    > an
    > > >entry to fstab unless neccessary. I tend to mount different
    > > >devices to different directories. For instance, if only one
    > > >device is plugged in it is /dev/sdb. So I may mount it to
    > > >/mnt/camera or /mnt/usb. Now, what if I plug in a second
    > USB
    > > >device? Naturally it will be /dev/sdc so I'd mount it
    > somewhere.
    
    > > Why are you avoiding /etc/fstab?  That seems to me like it
    > > would be the best solution.
    > > 
    > > The only alternative I can think of is sudo.  No wait, there
    > > is another.  You could suid /bin/mount to root.  I recommend
    > > against this since it would be a security hole.
    > 
    > could be tightened considerably by only allowing a certain
    > trusted
    > group (maybe operator?) permission to execute /bin/mount. 
    > this is
    > how shutdown(8) is set up on OpenBSD:
    > 
    > $ ls -l `which shutdown`
    > -r-sr-x---  1 root  operator  191824 Apr  3 15:45
    > /sbin/shutdown
    > $ 
    
    
    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around 
    http://mail.yahoo.com 
    
  • [Eug-lug] user write access to /mnt/??



    Jacob MeuserSun Apr 23 12:31:02 PDT 2006

    On Sun, Apr 23, 2006 at 10:41:22AM -0700, Allen Brown wrote:
    > Mr O wrote:
    > >The trouble is root can do it all. I'm not looking to add an
    > >entry to fstab unless neccessary. I tend to mount different
    > >devices to different directories. For instance, if only one
    > >device is plugged in it is /dev/sdb. So I may mount it to
    > >/mnt/camera or /mnt/usb. Now, what if I plug in a second USB
    > >device? Naturally it will be /dev/sdc so I'd mount it somewhere.
    > >Is there an "easy" (non-GUI) way to give permission for the user
    > >to write to those devices? I've tried to chown the folder to the
    > >username but once the device is mounted permissions are changed
    > >to root:root. Any other tips or tricks?
    > >
    > >That be all,
    > >Mr O.
    > 
    > Why are you avoiding /etc/fstab?  That seems to me like it
    > would be the best solution.
    > 
    > The only alternative I can think of is sudo.  No wait, there
    > is another.  You could suid /bin/mount to root.  I recommend
    > against this since it would be a security hole.
    
    could be tightened considerably by only allowing a certain trusted
    group (maybe operator?) permission to execute /bin/mount.  this is
    how shutdown(8) is set up on OpenBSD:
    
    $ ls -l `which shutdown`
    -r-sr-x---  1 root  operator  191824 Apr  3 15:45 /sbin/shutdown
    $ 
    
    -- 
    <jakemsr at jakemsr.com>
    
  • [Eug-lug] user write access to /mnt/??



    Jacob MeuserSun Apr 23 12:17:14 PDT 2006

    On Sun, Apr 23, 2006 at 09:52:02AM -0700, Mr O wrote:
    > The trouble is root can do it all. I'm not looking to add an
    > entry to fstab unless neccessary. I tend to mount different
    > devices to different directories. For instance, if only one
    > device is plugged in it is /dev/sdb. So I may mount it to
    > /mnt/camera or /mnt/usb. Now, what if I plug in a second USB
    > device?
    
    in OpenBSD, there is the hotplugd daemon, which is nice for this
    as well.
    
    http://www.openbsd.org/cgi-bin/man.cgi?query=hotplugd&arch=i386
    
    -- 
    <jakemsr at jakemsr.com>
    
  • [Eug-lug] user write access to /mnt/??



    Allen BrownSun Apr 23 10:41:22 PDT 2006

    Mr O wrote:
    > The trouble is root can do it all. I'm not looking to add an
    > entry to fstab unless neccessary. I tend to mount different
    > devices to different directories. For instance, if only one
    > device is plugged in it is /dev/sdb. So I may mount it to
    > /mnt/camera or /mnt/usb. Now, what if I plug in a second USB
    > device? Naturally it will be /dev/sdc so I'd mount it somewhere.
    > Is there an "easy" (non-GUI) way to give permission for the user
    > to write to those devices? I've tried to chown the folder to the
    > username but once the device is mounted permissions are changed
    > to root:root. Any other tips or tricks?
    > 
    > That be all,
    > Mr O.
    
    Why are you avoiding /etc/fstab?  That seems to me like it
    would be the best solution.
    
    The only alternative I can think of is sudo.  No wait, there
    is another.  You could suid /bin/mount to root.  I recommend
    against this since it would be a security hole.  (As would
    sudo if not done very carefully.)
    -- 
    Allen Brown  abrown at peak.org  http://www.peak.org/~abrown/
       The juvenile sea squirt wanders through the sea searching for
       a suitable rock or hunk of coral to cling to and make its home
       for life.  For this task it has a rudimentary nervous system.
       When it finds its spot and takes root, it doesn't need its
       brain any more so it eats it.  It's rather like getting tenure.
    
    
    > --- larry price <laprice at gmail.com> wrote:
    > 
    > 
    >>what's it listed as in /etc/mtab
    >>
    >>it sounds like either it was mounted read only, or you need to
    >>chmod
    >>o+w /mnt/blah
    >>
    >>
    >>On 4/22/06, Mr O <notanatheist at yahoo.com> wrote:
    >>
    >>>Just what it says. How can I give a user write access to a
    >>>device under /mnt/blah? USB key? Camera? I can read and copy
    >>
    >>but
    >>
    >>>not delete and create.
    >>>
    >>>TIA,
    >>>Mr O.
    
  • [Eug-lug] Newbie was entertaining Bellinham LinuxFest



    Mr OSun Apr 23 09:54:43 PDT 2006

    Gas cost is my biggest hold-up. I went a few years ago and it
    was fun. I drove to Seattle early Saturday morning and took the
    sponsored bus (Free) to Bellingham. These days I'm not
    interested in spending over $60 in gas to go up and back. FWIW,
    I would only attend one day and drive back that evening. 
    
    That be all,
    Mr O.
    
    --- Jay Perini <jayperini at hotmail.com> wrote:
    
    ---------------------------------
    
    HI,
    
    I have attempted to get a response to e-mail, and find a Eugene
    (EUGLUG) meeting, to no avail.
    
    I would like to go to WA convention, but $150 (gas or train/bus)
    and  2 nights motel is a bit too much. Plus I (probably) work
    Sunday night.
    
    I might just wait until S.F. show in August.
    
    Unless a rideshare or something opportunity for Bellingham
    arises.
    
    Any thoughts or advice?
    
    Jay
    
    
    
    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around 
    http://mail.yahoo.com 
    
  • [Eug-lug] user write access to /mnt/??



    Mr OSun Apr 23 09:52:02 PDT 2006

    The trouble is root can do it all. I'm not looking to add an
    entry to fstab unless neccessary. I tend to mount different
    devices to different directories. For instance, if only one
    device is plugged in it is /dev/sdb. So I may mount it to
    /mnt/camera or /mnt/usb. Now, what if I plug in a second USB
    device? Naturally it will be /dev/sdc so I'd mount it somewhere.
    Is there an "easy" (non-GUI) way to give permission for the user
    to write to those devices? I've tried to chown the folder to the
    username but once the device is mounted permissions are changed
    to root:root. Any other tips or tricks?
    
    That be all,
    Mr O.
    
    --- larry price <laprice at gmail.com> wrote:
    
    > what's it listed as in /etc/mtab
    > 
    > it sounds like either it was mounted read only, or you need to
    > chmod
    > o+w /mnt/blah
    > 
    > 
    > On 4/22/06, Mr O <notanatheist at yahoo.com> wrote:
    > > Just what it says. How can I give a user write access to a
    > > device under /mnt/blah? USB key? Camera? I can read and copy
    > but
    > > not delete and create.
    > >
    > > TIA,
    > > Mr O.
    
    
    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around 
    http://mail.yahoo.com 
    
  • [Eug-lug] user write access to /mnt/??



    Jacob MeuserSun Apr 23 03:19:10 PDT 2006

    On Sat, Apr 22, 2006 at 10:45:05PM -0700, Mr O wrote:
    > Just what it says. How can I give a user write access to a
    > device under /mnt/blah? USB key? Camera? I can read and copy but
    > not delete and create. 
    
    in OpenBSD, there is a sysctl called kern.usermount.  if the sysctl
    is nonzero and the device node to be mounted is readable and writable
    by the user, then the user can mount filesystems from that device on
    directories they own.  since the user owns the directory, they can
    add/delete/do whatever.
    
    example:
    
    <insert USB key>
    $ ls -l /dev/sd0i                   (this is the node for the fs on the key)
    brw-r-----  1 root  operator    4,   8 Jan 31 23:26 /dev/sd0i
    $ groups
    jakemsr wheel operator wsrc users
    $ sudo chmod g+w /dev/sd0i          (so I have write access to /dev/sd0i,
    Password:                            since I'm in the operator group)
    $ sysctl kern.usermount
    kern.usermount=0
    $ sudo sysctl kern.usermount=1
    kern.usermount=1
    $ sudo mkdir /mnt/jakemsr
    $ sudo chown jakemsr /mnt/jakemsr
    $ mkdir /mnt/jakemsr/usbkey
    $ mount /dev/sd0i /mnt/jakemsr/usbkey
    $ ls -a /mnt/jakemsr/usbkey
    .  ..
    $ touch /mnt/jakemsr/usbkey/newFile
    $ ls -a /mnt/jakemsr/usbkey
    .  ..  newFile
    $ 
    
    probably something rather similar in Linux, I would imagine.
    
    -- 
    <jakemsr at jakemsr.com>
    
  • [Eug-lug] user write access to /mnt/??



    larry priceSat Apr 22 23:29:06 PDT 2006

    what's it listed as in /etc/mtab
    
    it sounds like either it was mounted read only, or you need to chmod
    o+w /mnt/blah
    
    
    On 4/22/06, Mr O <notanatheist at yahoo.com> wrote:
    > Just what it says. How can I give a user write access to a
    > device under /mnt/blah? USB key? Camera? I can read and copy but
    > not delete and create.
    >
    > TIA,
    > Mr O.
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Tired of spam?  Yahoo! Mail has the best spam protection around
    > http://mail.yahoo.com
    > _______________________________________________
    > EUGLUG mailing list
    > euglug at euglug.org
    > http://www.euglug.org/mailman/listinfo/euglug
    >
    
  • [Eug-lug] user write access to /mnt/??



    Mr OSat Apr 22 22:45:05 PDT 2006

    Just what it says. How can I give a user write access to a
    device under /mnt/blah? USB key? Camera? I can read and copy but
    not delete and create. 
    
    TIA,
    Mr O.
    
    __________________________________________________
    Do You Yahoo!?
    Tired of spam?  Yahoo! Mail has the best spam protection around 
    http://mail.yahoo.com