# Re: Creating /dev/scanner

From: Douglas Gilbert (dgilbert@interlog.com)
Date: Thu Sep 07 2000 - 20:17:29 PDT

- Next message: M. Peck Dickens: "Re: Creating /dev/scanner"
  - Previous message: mh: "Re: SANE Api question: SANE_INFO_RELOAD_OPTIONS"
  - In reply to: Randolph Bentson: "Re: Creating /dev/scanner"
  - Next in thread: M. Peck Dickens: "Re: Creating /dev/scanner"
  - Reply: M. Peck Dickens: "Re: Creating /dev/scanner"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  Randolph Bentson wrote:
  >
  > On Fri, Sep 08, 2000 at 01:58:54AM -0400, M. Peck Dickens wrote:
  > > Hi there,
  > >
  > > OK, I've recieved my Fujitsu 600c and it works great under SANE!. Now, I want to
  > > create /dev/scanner and soft link it to /dev/sgd. My question is how do I do
  > > this properly and then give /dev/scanner the correct permissions so I can
  > > use SANE as joe user instead of as root and still have security in place?
  >
  > That's good news.
  >
  > You cannot use permissions on "/dev/scanner" to open access.

  Not if it's a symbolic link. However you could use mknod
  to make it point to the same device as /dev/sgd :
  mknod /dev/scanner c 21 3

  and then set the permissions on it. Hopefully this wouldn't
  confuse SANE. Probably not a smart idea though.

  > Provided you've got a stable hardware environment, i.e., one
  > which doesn't have SCSI devices added and removed on a whim,
  > you can add a group "sane_oper", add whomever you want to that
  > group, "chmod 660 /dev/sgd" and "chgrp sane_oper /dev/sgd".
  >
  > At least that's what I do.
  >
  > If you have SCSI devices added and removed, the device used to
  > access the scanner will change. You'll have to change which
  > device has the appropriate permissions. I believe the device
  > filesystem in 2.4 kernel will address this problem.

  There is also a user space utility called scsidev that could be
  useful in this regard (and it works on all versions of Linux). It
  allows aliases such as /dev/scanner to be created pointing at the
  (sg) device that matches a given set of parameters. For example,
  if you knew that your scanner has scsi id=5 then the following
  could be placed in the file /etc/scsi.alias :
  id=5, devtype=generic, alias=scanner

  See http://www.garloff.de/kurt/linux/scsidev
  What I have described above is documented in its manpage.

  Doug Gilbert

      --
      Source code, list archive, and docs: http://www.mostang.com/sane/
      To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com

  - Next message: M. Peck Dickens: "Re: Creating /dev/scanner"
  - Previous message: mh: "Re: SANE Api question: SANE_INFO_RELOAD_OPTIONS"
  - In reply to: Randolph Bentson: "Re: Creating /dev/scanner"
  - Next in thread: M. Peck Dickens: "Re: Creating /dev/scanner"
  - Reply: M. Peck Dickens: "Re: Creating /dev/scanner"
  - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

  This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 20:16:26 PDT