sane-project-website/old-archive/2000-09/0072.html

152 wiersze
5.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Creating /dev/scanner</TITLE>
<META NAME="Author" CONTENT="Douglas Gilbert (dgilbert@interlog.com)">
<META NAME="Subject" CONTENT="Re: Creating /dev/scanner">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Creating /dev/scanner</H1>
<!-- received="Thu Sep 7 20:11:02 2000" -->
<!-- isoreceived="20000908031102" -->
<!-- sent="Thu, 07 Sep 2000 23:17:29 -0400" -->
<!-- isosent="20000908031729" -->
<!-- name="Douglas Gilbert" -->
<!-- email="dgilbert@interlog.com" -->
<!-- subject="Re: Creating /dev/scanner" -->
<!-- id="39B85A49.3B3A5568@interlog.com" -->
<!-- inreplyto="20000907074348.B21720@grieg.holmsjoen.com" -->
<STRONG>From:</STRONG> Douglas Gilbert (<A HREF="mailto:dgilbert@interlog.com?Subject=Re:%20Creating%20/dev/scanner&In-Reply-To=&lt;39B85A49.3B3A5568@interlog.com&gt;"><EM>dgilbert@interlog.com</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu Sep 07 2000 - 20:17:29 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0073.html">M. Peck Dickens: "Re: Creating /dev/scanner"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0071.html">mh: "Re: SANE Api question: SANE_INFO_RELOAD_OPTIONS"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0063.html">Randolph Bentson: "Re: Creating /dev/scanner"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0073.html">M. Peck Dickens: "Re: Creating /dev/scanner"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0073.html">M. Peck Dickens: "Re: Creating /dev/scanner"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#72">[ date ]</A>
<A HREF="index.html#72">[ thread ]</A>
<A HREF="subject.html#72">[ subject ]</A>
<A HREF="author.html#72">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Randolph Bentson wrote:
<BR>
<EM>&gt;
</EM><BR>
<EM>&gt; On Fri, Sep 08, 2000 at 01:58:54AM -0400, M. Peck Dickens wrote:
</EM><BR>
<EM>&gt; &gt; Hi there,
</EM><BR>
<EM>&gt; &gt;
</EM><BR>
<EM>&gt; &gt; OK, I've recieved my Fujitsu 600c and it works great under SANE!. Now, I want to
</EM><BR>
<EM>&gt; &gt; create /dev/scanner and soft link it to /dev/sgd. My question is how do I do
</EM><BR>
<EM>&gt; &gt; this properly and then give /dev/scanner the correct permissions so I can
</EM><BR>
<EM>&gt; &gt; use SANE as joe user instead of as root and still have security in place?
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; That's good news.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; You cannot use permissions on &quot;/dev/scanner&quot; to open access.
</EM><BR>
<P>Not if it's a symbolic link. However you could use mknod
<BR>
to make it point to the same device as /dev/sgd :
<BR>
&nbsp;&nbsp;&nbsp;mknod /dev/scanner c 21 3
<BR>
<P>and then set the permissions on it. Hopefully this wouldn't
<BR>
confuse SANE. Probably not a smart idea though.
<BR>
<P><EM>&gt; Provided you've got a stable hardware environment, i.e., one
</EM><BR>
<EM>&gt; which doesn't have SCSI devices added and removed on a whim,
</EM><BR>
<EM>&gt; you can add a group &quot;sane_oper&quot;, add whomever you want to that
</EM><BR>
<EM>&gt; group, &quot;chmod 660 /dev/sgd&quot; and &quot;chgrp sane_oper /dev/sgd&quot;.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; At least that's what I do.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt; If you have SCSI devices added and removed, the device used to
</EM><BR>
<EM>&gt; access the scanner will change. You'll have to change which
</EM><BR>
<EM>&gt; device has the appropriate permissions. I believe the device
</EM><BR>
<EM>&gt; filesystem in 2.4 kernel will address this problem.
</EM><BR>
<P>There is also a user space utility called scsidev that could be
<BR>
useful in this regard (and it works on all versions of Linux). It
<BR>
allows aliases such as /dev/scanner to be created pointing at the
<BR>
(sg) device that matches a given set of parameters. For example,
<BR>
if you knew that your scanner has scsi id=5 then the following
<BR>
could be placed in the file /etc/scsi.alias :
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;id=5, devtype=generic, alias=scanner
<BR>
<P>See <A HREF="http://www.garloff.de/kurt/linux/scsidev">http://www.garloff.de/kurt/linux/scsidev</A>
<BR>
What I have described above is documented in its manpage.
<BR>
<P><P>Doug Gilbert
<BR>
<P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Creating%20/dev/scanner&In-Reply-To=&lt;39B85A49.3B3A5568@interlog.com&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0073.html">M. Peck Dickens: "Re: Creating /dev/scanner"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0071.html">mh: "Re: SANE Api question: SANE_INFO_RELOAD_OPTIONS"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0063.html">Randolph Bentson: "Re: Creating /dev/scanner"</A>
<!-- nextthread="start" -->
<LI><STRONG>Next in thread:</STRONG> <A HREF="0073.html">M. Peck Dickens: "Re: Creating /dev/scanner"</A>
<LI><STRONG>Reply:</STRONG> <A HREF="0073.html">M. Peck Dickens: "Re: Creating /dev/scanner"</A>
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#72">[ date ]</A>
<A HREF="index.html#72">[ thread ]</A>
<A HREF="subject.html#72">[ subject ]</A>
<A HREF="author.html#72">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu Sep 07 2000 - 20:16:26 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>