printing via serial to usb cable

Rashkae ubuntu at
Wed Jan 28 17:21:38 UTC 2009

Wade Smart wrote:
> Rashkae wrote:
>> Wade Smart wrote:
>>> 20090128 0906 GMT-5
>>> I recently posted about my parallel to usb cable causing lots of 
>>> problems on my system - and since I received no help there I decided to 
>>> try something else.
>>> I borrowed a serial to usb cable. I was able to print a test page by:
>>> sudo echo "Printer Test" > /dev/ttyUSB0
>>> but I havent been able to print any other way.
>>> In cups I changed the uri to usb://dev/ttyUSB0 and then I ran the 
>>> configure script but nothing changed.
>>> What else can I try?
>>> Wade
>> Try a serial URI
>> ex: serial:/dev/ttyUSB0?baud=11500
>> Also note: I think (without being absolutely certain) that you only use
>> 1 / when you refer to a file (or a device note) directly on your system,
>> use // when your are specifying a network resource.  I don't know if
>> that matters or if CUPS is smart enough to figure that out on it's own.
>>  ( // also seems to be used by USB printers that are named by their
>> model number rather than a device note, for examply, in my system, I
>> have usb://Samsung/ML-1740  compared to parallel:/dev/lp0)
> 20090128 1007 GMT-5
> Okay... LaserJet4050 (Default Printer) "Unable to open device file 
> "/dev/ttyUSB0": Permission denied"
> And in my logs:
> Jan 28 10:05:42 wadesmart kernel: [145933.655140] 
> audit(1233158742.764:27): type=1503 operation="inode_permission" 
> requested_mask="rw::" denied_mask="rw::" name="/dev/ttyUSB0" pid=28751 
> profile="/usr/sbin/cupsd" namespace="default"
> Jan 28 10:05:43 wadesmart kernel: [145934.058182] 
> audit(1233158743.168:28): type=1503 operation="inode_permission" 
> requested_mask="::rw" denied_mask="::rw" name="/dev/tty" pid=28757 
> profile="/usr/sbin/cupsd" namespace="default"
> Jan 28 10:06:26 wadesmart kernel: [145977.419281] 
> audit(1233158786.616:29): type=1503 operation="inode_permission" 
> requested_mask="rw::" denied_mask="rw::" name="/dev/ttyUSB0" pid=28801 
> profile="/usr/sbin/cupsd" namespace="default"
> Jan 28 10:06:27 wadesmart kernel: [145977.820661] 
> audit(1233158787.020:30): type=1503 operation="inode_permission" 
> requested_mask="::rw" denied_mask="::rw" name="/dev/tty" pid=28808 
> profile="/usr/sbin/cupsd" namespace="default"
> Wade

By default, Ubuntu gives read/write permission to User root and group lp
for printer devices.

Unfortunately, the device scripts probably don't realize your serial
device is supposed to be a printer device, and therefore lp group (which
cups user is probably using) doesn't have write permission.

You can test with the following:

first, make sure that the device is not a symlink to somewhere else.

ls -lh /dev/ttyUSB0

then, assuming we have the correct device file:

sudo chown root:lp /dev/ttyUSB0

sudo chmod 660 /dev/ttyUSB0

Then try printing again and let us know if it works.  Unfortunately,
making these changes permanent requires a bit more voodoo.. Hopefully
someone can step in, else I'll research it further.

PS: Karl has a well known habit on this list to jump in to topics way
over his head to either hilarious or catastrophic result.  I suggest
liberal use of salt grains.

More information about the ubuntu-users mailing list