Discussion:
virtualbox - serial port
Joseph
2012-09-18 02:52:55 UTC
Permalink
I'm trying to configure virutalbox serial port, but I'm getting an error:

NamedPipe#0 failed to connect to local socket /dev/ttyS0 (VERR_ACCESS_DENIED).

in "inittab" I have:
c7:2345:respawn:/usr/sbin/faxgetty ttyS0

is the above correct?

In virtualbox - serial port
Port Number: COM1
Port Mode: Host Device
Port/File Path: /dev/ttyS0

What am I missing?
--
Joseph
J. Roeleveld
2012-09-18 05:07:36 UTC
Permalink
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
c7:2345:respawn:/usr/sbin/faxgetty ttyS0
is the above correct?
In virtualbox - serial port
Port Number: COM1
Port Mode: Host Device
Port/File Path: /dev/ttyS0
What am I missing?
Joseph.

Do you have permissions set correctly to access the serial port normally (without virtualbox)?

--
Joost
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Joseph
2012-09-18 12:34:31 UTC
Permalink
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
c7:2345:respawn:/usr/sbin/faxgetty ttyS0
is the above correct?
In virtualbox - serial port
Port Number: COM1
Port Mode: Host Device
Port/File Path: /dev/ttyS0
What am I missing?
Joseph.
Do you have permissions set correctly to access the serial port normally (without virtualbox)?
--
Joost
The tty0 has permission:

ls -l /dev/ttyS0
crw-rw---- 1 root tty 4, 64 Sep 17 20:56 /dev/ttyS0

Is the above correct permission?

Thanks,
--
Joseph
J. Roeleveld
2012-09-18 13:03:41 UTC
Permalink
Post by J. Roeleveld
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
c7:2345:respawn:/usr/sbin/faxgetty ttyS0
is the above correct?
In virtualbox - serial port
Port Number: COM1
Port Mode: Host Device
Port/File Path: /dev/ttyS0
What am I missing?
Joseph.
Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
Post by J. Roeleveld
--
Joost
ls -l /dev/ttyS0
crw-rw---- 1 root tty 4, 64 Sep 17 20:56 /dev/ttyS0
Is the above correct permission?
Thanks,
Those are default permissions. However those normally won't give a normal user access. You can change the permissions of that file/device to enable your user to have access.

I am typing this on my mobile and can't quickly tell you how to do that on a permanent basis. But for a quick change you can use 'chown' to change the owner to your own user.

--
Joost
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Alex Schuster
2012-09-18 13:12:09 UTC
Permalink
Post by J. Roeleveld
ls -l /dev/ttyS0 crw-rw---- 1 root tty 4, 64 Sep 17 20:56
/dev/ttyS0
Is the above correct permission?
Those are default permissions. However those normally won't give a
normal user access. You can change the permissions of that
file/device to enable your user to have access.
I am typing this on my mobile and can't quickly tell you how to do
that on a permanent basis. But for a quick change you can use 'chown'
to change the owner to your own user.
What about 'gpasswd -a <user> tty' to add the tty group to the user?
Needs a re-login to make use of the changes.

Wonko
Joseph
2012-09-18 13:27:40 UTC
Permalink
Post by Alex Schuster
Post by J. Roeleveld
ls -l /dev/ttyS0 crw-rw---- 1 root tty 4, 64 Sep 17 20:56
/dev/ttyS0
Is the above correct permission?
Those are default permissions. However those normally won't give a
normal user access. You can change the permissions of that
file/device to enable your user to have access.
I am typing this on my mobile and can't quickly tell you how to do
that on a permanent basis. But for a quick change you can use 'chown'
to change the owner to your own user.
What about 'gpasswd -a <user> tty' to add the tty group to the user?
Needs a re-login to make use of the changes.
Wonko
Yes, I'm tty group:
tty lp wheel mail cron audio cdrom postgres cdrw usb users scanner vboxusers

in addition I have try to change the permission to:
chmod 0666 /dev/ttyS0

but it makes no difference, when starting virtualbox xp I'm still getting the error:
NamedPipe#0 failed to connect to local socket /dev/ttyS0 (VERR_NET_CONNECTION_REFUSED).
--
Joseph
Michael Mol
2012-09-18 13:34:03 UTC
Permalink
Post by Joseph
Post by Alex Schuster
Post by J. Roeleveld
ls -l /dev/ttyS0 crw-rw---- 1 root tty 4, 64 Sep 17 20:56
/dev/ttyS0
Is the above correct permission?
Those are default permissions. However those normally won't give a
normal user access. You can change the permissions of that
file/device to enable your user to have access.
I am typing this on my mobile and can't quickly tell you how to do
that on a permanent basis. But for a quick change you can use 'chown'
to change the owner to your own user.
What about 'gpasswd -a <user> tty' to add the tty group to the user?
Needs a re-login to make use of the changes.
Wonko
tty lp wheel mail cron audio cdrom postgres cdrw usb users scanner vboxusers
chmod 0666 /dev/ttyS0
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_NET_CONNECTION_REFUSED).
Sounds like policykit, then. Someone with policykit experience might
be able to tell us how to ask the system which privileges are required
to access that file, and then how to ask the system to give those
privileges to a given user.

(Not knowing much about policykit, but knowing some of what it's
capable of, this would be something I'd like to hear.)
--
:wq
Joseph
2012-09-18 13:17:10 UTC
Permalink
On 09/18/12 15:03, J. Roeleveld wrote:

[snip]
Post by J. Roeleveld
Post by Joseph
ls -l /dev/ttyS0
crw-rw---- 1 root tty 4, 64 Sep 17 20:56 /dev/ttyS0
Is the above correct permission?
Thanks,
Those are default permissions. However those normally won't give a normal user access. You can change the permissions of that file/device to enable your user to have access.
I am typing this on my mobile and can't quickly tell you how to do that on a permanent basis. But for a quick change you can use 'chown' to change the owner to your own user.
Though, I forgot to mention that I'm in tty group so I have access to this file.
--
Joseph
Joseph
2012-09-18 14:49:10 UTC
Permalink
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
c7:2345:respawn:/usr/sbin/faxgetty ttyS0
is the above correct?
In virtualbox - serial port
Port Number: COM1
Port Mode: Host Device
Port/File Path: /dev/ttyS0
What am I missing?
Joseph.
Do you have permissions set correctly to access the serial port normally (without virtualbox)?
--
Joost
How do I check if some other application are not using serial port?
--
Joseph
Michael Mol
2012-09-18 15:01:01 UTC
Permalink
Post by Joseph
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
c7:2345:respawn:/usr/sbin/faxgetty ttyS0
is the above correct?
In virtualbox - serial port
Port Number: COM1
Port Mode: Host Device
Port/File Path: /dev/ttyS0
What am I missing?
Joseph.
Do you have permissions set correctly to access the serial port normally
(without virtualbox)?
--
Joost
How do I check if some other application are not using serial port?
lsof -n |grep /dev/tty
--
:wq
Joseph
2012-09-18 15:24:26 UTC
Permalink
Post by Michael Mol
Post by Joseph
How do I check if some other application are not using serial port?
lsof -n |grep /dev/tty
--
:wq
Nothing is using ttyS0 so I'm puzzled why virtualbox is giving me permission error
--
Joseph
Grant Edwards
2012-09-18 16:00:25 UTC
Permalink
Post by Joseph
Post by Michael Mol
Post by Joseph
How do I check if some other application are not using serial port?
lsof -n |grep /dev/tty
--
:wq
Nothing is using ttyS0
That has nothing to do with a permission error. If you had proper
permissions, you won't get a permission error even if something else
is using ttyS0.
Post by Joseph
so I'm puzzled why virtualbox is giving me permission error
What happens when you do "cat /dev/ttyS0"?
--
Grant Edwards grant.b.edwards Yow! I'm RELIGIOUS!!
at I love a man with
gmail.com a HAIRPIECE!! Equip me
with MISSILES!!
Grant Edwards
2012-09-18 15:06:38 UTC
Permalink
Post by Joseph
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
[...]
Post by Joseph
Post by J. Roeleveld
Post by Joseph
What am I missing?
Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
How do I check if some other application are not using serial port?
To check to see if another app has the port open, use lsof. But,
that's not what's causing your error. Linux allows serial ports to be
open by multiple processes.

Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
--
Grant Edwards grant.b.edwards Yow! Nipples, dimples,
at knuckles, NICKLES,
gmail.com wrinkles, pimples!!
Joseph
2012-09-18 15:30:02 UTC
Permalink
Post by Grant Edwards
Post by Joseph
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
[...]
Post by Joseph
Post by J. Roeleveld
Post by Joseph
What am I missing?
Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
How do I check if some other application are not using serial port?
To check to see if another app has the port open, use lsof. But,
that's not what's causing your error. Linux allows serial ports to be
open by multiple processes.
Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
--
Grant Edwards grant.b.edwards Yow! Nipples, dimples,
at knuckles, NICKLES,
gmail.com wrinkles, pimples!!
When I run: lsof -n |grep /dev/ttyS
nothing is showing up so I'm sure no other application is using it. I run hylafax but I disabled it and commented out in inittab:
#c7:2345:respawn:/usr/sbin/faxgetty ttyS0

I set ttyS0 to "666"
ll /dev/ttyS*
crw-rw-rw- 1 uucp tty 4, 64 Sep 18 09:21 /dev/ttyS0
crw-rw---- 1 root uucp 4, 65 Sep 2 06:09 /dev/ttyS1
crw-rw---- 1 root uucp 4, 66 Sep 2 06:09 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 Sep 2 06:09 /dev/ttyS3

I'm in group "tty", so I can not figure it out why virtualbox is complaining.
--
Joseph
Grant Edwards
2012-09-18 15:59:21 UTC
Permalink
Post by Joseph
Post by Grant Edwards
Post by Joseph
Post by J. Roeleveld
Post by Joseph
NamedPipe#0 failed to connect to local socket /dev/ttyS0
(VERR_ACCESS_DENIED).
[...]
Post by Joseph
Post by J. Roeleveld
Post by Joseph
What am I missing?
Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
How do I check if some other application are not using serial port?
To check to see if another app has the port open, use lsof. But,
that's not what's causing your error. Linux allows serial ports to be
open by multiple processes.
Do you have permissions set correctly to access the serial port
normally (without virtualbox)?
When I run: lsof -n |grep /dev/ttyS
nothing is showing up so I'm sure no other application is using it. I
#c7:2345:respawn:/usr/sbin/faxgetty ttyS0
I set ttyS0 to "666"
ll /dev/ttyS*
crw-rw-rw- 1 uucp tty 4, 64 Sep 18 09:21 /dev/ttyS0
crw-rw---- 1 root uucp 4, 65 Sep 2 06:09 /dev/ttyS1
crw-rw---- 1 root uucp 4, 66 Sep 2 06:09 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 Sep 2 06:09 /dev/ttyS3
I'm in group "tty", so I can not figure it out why virtualbox is complaining.
What happens when you do "cat /dev/ttyS0"?
--
Grant Edwards grant.b.edwards Yow! ... bleakness
at ... desolation ... plastic
gmail.com forks ...
Joseph
2012-09-18 17:49:33 UTC
Permalink
On 09/18/12 15:59, Grant Edwards wrote:

[snip]
Post by Grant Edwards
Post by Joseph
I'm in group "tty", so I can not figure it out why virtualbox is complaining.
What happens when you do "cat /dev/ttyS0"?
--
Grant Edwards grant.b.edwards Yow! ... bleakness
at ... desolation ... plastic
gmail.com forks ...
It is working know. It was my error :-/
I had it selected "host pipe" and it should be "host device'
One of those days :-)
--
Joseph
Mick
2012-09-21 05:38:38 UTC
Permalink
Post by Joseph
[snip]
Post by Grant Edwards
Post by Joseph
I'm in group "tty", so I can not figure it out why virtualbox is complaining.
What happens when you do "cat /dev/ttyS0"?
It is working know. It was my error :-/
I had it selected "host pipe" and it should be "host device'
One of those days :-)
Mine looks like this:

$ ls -l /dev/ttyS0
crw-rw---- 1 root uucp 4, 64 Sep 21 06:16 /dev/ttyS0

and the user (me) is a member of the uucp group. Not sure if this is a more
correct way to configure it ...
--
Regards,
Mick
Grant Edwards
2012-09-21 15:18:48 UTC
Permalink
Post by Mick
Post by Joseph
[snip]
Post by Grant Edwards
Post by Joseph
I'm in group "tty", so I can not figure it out why virtualbox is complaining.
What happens when you do "cat /dev/ttyS0"?
It is working know. It was my error :-/
I had it selected "host pipe" and it should be "host device'
One of those days :-)
$ ls -l /dev/ttyS0
crw-rw---- 1 root uucp 4, 64 Sep 21 06:16 /dev/ttyS0
and the user (me) is a member of the uucp group. Not sure if this is
a more correct way to configure it ...
Adding the user to the group that owns the device is the usual way to
do give users access to hardware.
--
Grant Edwards grant.b.edwards Yow! Of course, you
at UNDERSTAND about the PLAIDS
gmail.com in the SPIN CYCLE --
Continue reading on narkive:
Loading...