LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Setting Permissions for a Program to open a port (https://www.linuxquestions.org/questions/linux-software-2/setting-permissions-for-a-program-to-open-a-port-827553/)

gbvoris 08-20-2010 09:32 PM

Setting Permissions for a Program to open a port
 
How do I set permision for a prog. to open a port?
I need to permit Bitpim to open a port when I run it.

estabroo 08-21-2010 08:55 AM

if the port is above 1024 then it should already be able to open the port

Below 1024 you either need to be root or have CAP_NET_BIND_SERVICE set on the program (use setcap)

gbvoris 08-21-2010 07:31 PM

I have no idea what port it is trying to open. i tried to run as root and that didn't help (thought being that maybe I needed to have permission to use it?)

estabroo 08-21-2010 08:24 PM

Just took a look at bitpim, are you sure it opens a port? Looks more like it makes a usb connection to a phone

gbvoris 08-22-2010 12:46 PM

Not sure what you call it. The 'info' says permissions and something about a port or ports. When I look for the connection I'm show an inactive connection and the window says it's com and serial ports.??

gbvoris 08-22-2010 01:09 PM

How can I send a screen shot? This is what I get:
When I go to settings and browse for a com port I get
=====Inoperable Ports=====
UBS Modem (/dev/ttyACMO)

-----------------------------------------------------------------------------

BitPim will try to detect the correct port automatically when accessing your phone.

If I then press "Refresh "I get:

This port should not be selected. If you believe it is the correct port, you should cause it to become available such as by plugging in the cable or ensuring you have correct permissions. Press refresh once you have done so and it should be listed under available. Note that the name may change as it becomes available.
Property
Value
Description
available
False
It was not possible to open this port
class
modem
This is a modem connection
description
USB modem (/dev/ttyACM0)

device
(166, 0)

driver
ttyACM

name
/dev/ttyACM0
This is the name the port is known to your operating system as


When I look in Drake the computer sees the phone.
Any more ideas?

estabroo 08-22-2010 08:17 PM

does the user you are trying to run bitpm as have permissions to read/write /dev/ttyACM0?

gbvoris 08-23-2010 06:35 PM

I have no idea.
I tried chmod 777 /dev/ttyACMO
Now I can set the port; but the phone isn't auto detected and it won't 'talk' to the prog.
Any ideas?

estabroo 08-23-2010 07:24 PM

ls -l /dev/ttyACM0 that'll show you the permissions for owner, group, and everyone else, plus give you the owner and group for the device, compare that with the user you want to have access

gbvoris 08-23-2010 07:31 PM

Just edited previous post chmod lets me set the port but I still cann't auto detect or talk to the phone
When I set the phone to allow access to the card I can see the micro sd card contents.
I think that tells me that the cable and drivers are right .
Yes?

estabroo 08-24-2010 07:25 AM

you mean on the computer you can see the sd card that's in the phone? If yes, then yeah I'd say the cable and drivers are at least functioning.

gbvoris 08-24-2010 07:06 PM

I have to set the phone to allow the c sd card to be seen.
I still cannot detect the phone if card read is enabled or not.
The test I used to verify the phone setup is to access it on a windoz machine, it works fine.

estabroo 08-24-2010 07:55 PM

can you access the sd card from the linux box?

gbvoris 08-24-2010 08:41 PM

Yes
Never tried on the windoz box

Off this subject, any big trick to dual booting another flavor? Thinking bout debian or

estabroo 08-25-2010 08:39 PM

Dunno, I guess you need to re-read the bitpim documentation and see if it provides any insights.

with regards to dual booting, biggest trick is to not wipe your current install when adding the new one


All times are GMT -5. The time now is 11:56 PM.