[Novalug] Inherited folder/file access

donjr djr1952 at hotpop.com
Mon Mar 5 01:54:42 EST 2007


On Sun, 2007-03-04 at 23:52 -0500, D Rider wrote:

> 
> So this is what I found tonight (finally):
> >From http://penguin-breeder.org/sane/saned/#faq
> 
> 2. # Are the device access rights correct?
> 
>       	  An error like "Device busy" is often caused by incorrect device
>       	  access rights.
> 
>     *             Log in as user saned and see whether scanimage -L
>                       finds your scanner.
> 
>     *             If you're using a parallel port scanner, you need to run
>                       saned as user root. Please ensure you didn't
>             	  configure inetd or xinetd to run saned
>             	  as user saned in that case.
> 
> This is a parallel port scanner and I found nothing in xinetd.conf
> (and no inetd.conf file found).  So, I believe I am screwed to use
> root access to make it work.  I still have not had any luck getting
> the folder perms to inherit.  Or would the program explicitly set the
> access per root user?


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. }


> Geez.  Maybe I should write a script to mod the access on existing
> files/folders (under a common folder location) and then open it each
> time after I scan a new file.
> 

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.

--  
-- 
 Don E. Groves, Jr. 

$ /usr/games/fortune : 
The devil can cite Scripture for his purpose.
  -- William Shakespeare, "The Merchant of Venice"



More information about the Novalug mailing list