[Novalug] Inherited folder/file access

D Rider twigboy2 at gmail.com
Mon Mar 5 23:48:28 EST 2007


On 3/5/07, donjr <djr1952 at hotpop.com> wrote:

> I suppose you have already seen and read the following web page:
>  <http://penguin-breeder.org/sane/mustek_pp/>
>  "Penguin Breeder - SANE Mustek Parallel Port Scanner"
> for detail configuration information.
>
> What does the following return:
>   scanimage -L
> ran as the users root, sane and twigboy2
>
> I get the following as any of my set:
>   device `net:cups:hpoj:mlc:usb:OfficeJet_G55' is a Hewlett-Packard
>   OfficeJet G55 multi-function peripheral
>
> For a parallel port scanner the device(s) to check out are:
> crw-rw---- 1 root lp 6, 0 2007-02-10 16:58  /dev/lp0       # or higher
> crw-rw---- 1 root lp 6, 0 2007-02-10 16:58  /dev/parport0  # or higher
>
> Default owner,group combo is root,lp
>
> So one possible fix(work around) that may work is to make the users:
>   sane
> and
>   twigboy2      {or whatever your default user is}
>
> both members of the group 'lp'.
>
>   ( Editing NOT Recommended, but here is a pointer to how it gets set.)
> The file that you would need to edit to change either the owner or group
> of lp# or parport# devices IS: /etc/udev/rules.d/40-permissions.rules
> See (man udev) for details.
>  {This is the kernel helper program that makes the Device File
> System(devfs) function and compatable with older programs.}
>
> Be very very careful as a mistake at this level can render a system
> NON-Bootable.
>
> As far as 'inetd' daemon goes, do you have the package xinetd installed?
>   xinetd is Ubuntu's replacement for inetd with many enhancements.
>
> It is configured by files in the directory /etc/xinetd.d/ area.
>  { I don't have it currently installed or run it here, so I cannot be of
> much more help in that area. }
>

>
> When running a complex program, such as 'xsane', as the super user root
> you are taking the chance that it might crash and take the WHOLE system
> with it, including the data on the hard drive(s). <sad grin>
>   Running a complex program as the super user root if you don't have to,
> is never a good idea.
>

Yipes!  OK, I trust your experience.  I'll work on it here...

> --
> --
>  Don E. Groves, Jr.
>

Looking at the web page (http://penguin-breeder.org/sane/mustek_pp/)
much more closely this time, and trying things along the way rather
than stopping when something doesn't work...

I read:
          "If you have support for parallel port devices, you probably
don't have
          enough access rights to the parallel port device:

            $ ls -l /dev/parport0"

which produces:
ls: /dev/parport0: No such file or directory

More:
         "Please make sure, you have CONFIG_PPDEV enabled in
          your kernel's configuration. To check whether you have parallel port
          device support enabled, try"
#modprobe ppdev
#grep ppdev /proc/devices
 99 ppdev

which means it is enabled.

However, strangely, after running those last two lines, then "ls -l
/dev/parport0" produces:
crw-rw---- 1 root lp 99, 0 2007-03-05 23:02 /dev/parport0

Further:

          "You can create such a device using this command:

            # mknod /dev/parport0 c 99 0"

Huh?  Doesn't this device need to exist before sane runs?


Next, according to the web page, I change the group and access perms:

chown root:users /dev/parport0 && chmod g=rw /dev/parport0

(the group needs w permission so the scanner is detected)

So, I run xsane as normal user and voila! it starts and operates the
scanner.  It saves the resulting files.  Success!  However, when
closing it complains 3 times (pop up messages):

"Failed to create file: Permission denied."

with the only option to Close.  After closing the third, xsane closes.
 It did save the files to my Desktop.  This happens even if I don't
scan.

Annoying.  Any ideas what that is?  I wonder if /dev/parport0 will
disappear again too.  I wonder if this is something weird about root
access and I'll have doomsday machine triggered by my scanner.

Thank you for bearing with me through this thought processing.  And
especially thanks for your help.  Hope I get to the end of this.

David.



More information about the Novalug mailing list