Linux printer access part 2...

Discussion in 'NZ Computing' started by Richard, Jun 6, 2009.

  1. Richard

    Richard Guest

    Have another machine to do it on which is more promsing

    Has a new install of debian lenny on it and its working sweet as, and
    since its not a firewall as well it will get firefox on it etc once I
    get stuff working.

    Problem is that it creates /dev/usb/lp0 when the printer is connected,
    and removes it when disconencted.

    When it creates it, the permissions don't allow for everyone to write to
    it, which I need to be able to cat stuff to it from apache in php.

    How does one set the permissions that things are assigned when they are
    created?
    Richard, Jun 6, 2009
    #1
    1. Advertising

  2. In message <h0eb2t$f9f$>, Richard wrote:

    > Problem is that it creates /dev/usb/lp0 when the printer is connected,
    > and removes it when disconencted.
    >
    > When it creates it, the permissions don't allow for everyone to write to
    > it, which I need to be able to cat stuff to it from apache in php.
    >
    > How does one set the permissions that things are assigned when they are
    > created?


    This is controlled by udev. On my Debian Unstable system, in the file
    /lib/udev/rules.d/91-permissions.rules, there is a default rule for USB
    printers:

    KERNEL=="lp[0-9]*", SUBSYSTEMS=="usb", GROUP="lp"

    This means that the device file is to be created as belonging to the group
    "lp". You can override this with custom rules in /etc/udev/rules.d. Or you
    can just make sure that the relevant users are put into the lp group.

    More details are in the udev(7) man page.
    Lawrence D'Oliveiro, Jun 12, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yar
    Replies:
    4
    Views:
    1,606
    Juan Carlos \(El fortinero\)
    Sep 21, 2004
  2. Nick de Graeve

    Importing TB mail from linux in linux

    Nick de Graeve, Oct 4, 2004, in forum: Firefox
    Replies:
    0
    Views:
    620
    Nick de Graeve
    Oct 4, 2004
  3. Southern Kiwi
    Replies:
    6
    Views:
    2,108
    Southern Kiwi
    Mar 19, 2006
  4. Have a nice cup of pee

    Linux... yeah linux.. Linux

    Have a nice cup of pee, Apr 12, 2006, in forum: NZ Computing
    Replies:
    19
    Views:
    616
    Bette Noir
    Apr 17, 2006
  5. jollyjimpoppy

    Easy part done, now the hard part!!

    jollyjimpoppy, Sep 10, 2003, in forum: A+ Certification
    Replies:
    0
    Views:
    400
    jollyjimpoppy
    Sep 10, 2003
Loading...

Share This Page