Unix Programming - access to unix devices

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > January 2004 > access to unix devices





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author access to unix devices
Mike

2004-01-23, 5:06 pm

Hi,
i'm trying to use the parallelport of my freebsd box as an cheap
binary io module from apache as a server side include.
So if i try, as user nobody, to fopen the /dev/lpt i get an error
"unable to open device permission denied". When i su to root it works.
How/where can i set the permission to access the device? Are there any
other hints?
Thanks in advance
Mike
Jens.Toerring@physik.fu-berlin.de

2004-01-23, 5:06 pm

Mike <mike.koeppel@solnet.ch> wrote:
quote:

> i'm trying to use the parallelport of my freebsd box as an cheap
> binary io module from apache as a server side include.
> So if i try, as user nobody, to fopen the /dev/lpt i get an error
> "unable to open device permission denied". When i su to root it works.
> How/where can i set the permission to access the device? Are there any
> other hints?



Obviously, you got to change the permissions for /dev/lpt. Do a

chmod 666 /dev/lpt

to allow both read and write access for everyone to the device file.

Regards, Jens
--
_ _____ _____
| ||_ _||_ _| Jens.Toerring@physik.fu-berlin.de
_ | | | | | |
| |_| | | | | | http://www.physik.fu-berlin.de/~toerring
\___/ens|_|homs|_|oerring
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com