Re: Chmod of /dev/ulptN

2013-02-12 Thread Ronald F. Guilmette

In message , 
=?ISO-8859-1?Q?Trond_Endrest=F8l?=  wrote:

>On Mon, 11 Feb 2013 18:33-0800, Ronald F. Guilmette wrote:
>
>> I exactly followed the directions here:
>> 
>>   http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238118.
>html
>> 
>> Nontheless, my /dev/lpt0 node still only has permissions set to 0644.
>> 
>> Why?
>> 
>> What did I do wrong?
>
>Is this about /dev/ulpt[0-9]+ or about /dev/lpt[0-2]?

I was only concerned about /dev/ulpt[0-9]+

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Chmod of /dev/ulptN

2013-02-12 Thread Warren Block

On Tue, 12 Feb 2013, Polytropon wrote:


On Mon, 11 Feb 2013 18:33:12 -0800, Ronald F. Guilmette wrote:

I exactly followed the directions here:

  http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238118.html

Nontheless, my /dev/lpt0 node still only has permissions set to 0644.


In the subject you've mentioned /dev/ulpt (USB LPT port), and
now /dev/lpt (conventional LPT port), still the same applies
for both.


Actually, the standard devfs.conf settings do not work for dynamic 
devices like ulpt0.  devd is the only way to do that for dynamic 
devices.  Here's an example I use use for a USB printer.  The vendor and 
product IDs were determined with usbconfig dump_device_desc:


# WB
# link Epson R200 printer to /dev/ulpt-r200 and unlpt-r200
attach 20 {
device-name "ulpt[0-9]";
match "vendor" "0x04b8";
match "product" "0x0005";
action "ln -sf /dev/$device-name /dev/ulpt-r200";
action "ln -sf /dev/`echo $device-name \
| sed -e 's/ulpt/unlpt/'` /dev/unlpt-r200";
action "chmod g+w /dev/ulpt-r200 /dev/unlpt-r200";
};

# WB
detach 20 {
device-name "ugen[0-9].[0-9]";
match "vendor" "0x04b8";
match "product" "0x0005";
action "rm -f /dev/ulpt-r200 /dev/unlpt-r200";
};
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Chmod of /dev/ulptN

2013-02-12 Thread Polytropon
On Mon, 11 Feb 2013 18:33:12 -0800, Ronald F. Guilmette wrote:
> I exactly followed the directions here:
> 
>   
> http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238118.html
> 
> Nontheless, my /dev/lpt0 node still only has permissions set to 0644.

In the subject you've mentioned /dev/ulpt (USB LPT port), and
now /dev/lpt (conventional LPT port), still the same applies
for both.



> Why?

Because the content of /dev is dynamically generated and maintained
as a virtual file system. This service is controled by devfs (devices
created at startup time) and devd (devices dynamically created during
runtime), both with their respective configuration files devfs.conf
and devfs.rules, and devd.conf. Those files need to be adjusted. To
make the change become active, restart the service.



> What did I do wrong?

You did not use the current proper method. :-)

Make the change you need in /etc/devfs.conf, e. g.

perm ulpt0 0664

if you need rw/rw/r. You can also use "own user:group" in
a similar way if you need to change file owner or group.
See "man devfs.conf" for details.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: Chmod of /dev/ulptN

2013-02-11 Thread Trond Endrestøl
On Mon, 11 Feb 2013 18:33-0800, Ronald F. Guilmette wrote:

> I exactly followed the directions here:
> 
>   
> http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238118.html
> 
> Nontheless, my /dev/lpt0 node still only has permissions set to 0644.
> 
> Why?
> 
> What did I do wrong?

Is this about /dev/ulpt[0-9]+ or about /dev/lpt[0-2]?

If the latter is the case, then maybe you should edit /etc/devfs.conf 
instead.

Something along these lines would help:

own  lpt0 root:wheel
perm lpt0 0660

-- 
+---++
| Vennlig hilsen,   | Best regards,  |
| Trond Endrestøl,  | Trond Endrestøl,   |
| IT-ansvarlig, | System administrator,  |
| Fagskolen Innlandet,  | Gjøvik Technical College, Norway,  |
| tlf. mob.   952 62 567,   | Cellular...: +47 952 62 567,   |
| sentralbord 61 14 54 00.  | Switchboard: +47 61 14 54 00.  |
+---++___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Chmod of /dev/ulptN

2013-02-11 Thread Ronald F. Guilmette


I exactly followed the directions here:

  http://lists.freebsd.org/pipermail/freebsd-questions/2012-February/238118.html

Nontheless, my /dev/lpt0 node still only has permissions set to 0644.

Why?

What did I do wrong?
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"