LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-20-2010, 09:32 PM   #1
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Rep: Reputation: 0
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.
 
Old 08-21-2010, 08:55 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
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)
 
Old 08-21-2010, 07:31 PM   #3
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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?)
 
Old 08-21-2010, 08:24 PM   #4
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Just took a look at bitpim, are you sure it opens a port? Looks more like it makes a usb connection to a phone
 
Old 08-22-2010, 12:46 PM   #5
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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.??
 
Old 08-22-2010, 01:09 PM   #6
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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?

Last edited by gbvoris; 08-22-2010 at 02:27 PM.
 
Old 08-22-2010, 08:17 PM   #7
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
does the user you are trying to run bitpm as have permissions to read/write /dev/ttyACM0?
 
Old 08-23-2010, 06:35 PM   #8
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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?

Last edited by gbvoris; 08-23-2010 at 07:29 PM.
 
Old 08-23-2010, 07:24 PM   #9
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
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
 
Old 08-23-2010, 07:31 PM   #10
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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?

Last edited by gbvoris; 08-23-2010 at 07:43 PM.
 
Old 08-24-2010, 07:25 AM   #11
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
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.
 
Old 08-24-2010, 07:06 PM   #12
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
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.
 
Old 08-24-2010, 07:55 PM   #13
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
can you access the sd card from the linux box?
 
Old 08-24-2010, 08:41 PM   #14
gbvoris
LQ Newbie
 
Registered: Nov 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Yes
Never tried on the windoz box

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

Last edited by gbvoris; 08-24-2010 at 08:43 PM.
 
Old 08-25-2010, 08:39 PM   #15
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
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
 
  


Reply

Tags
permissions, port



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
If I forward a port in iptables, does the port have to be open on the firewall? qwertyjjj Linux - Server 4 08-06-2009 09:22 AM
LXer: Setting the SUID/SGID bits: Giving a program YOUR permissions when it runs LXer Syndicated Linux News 0 03-09-2007 07:16 PM
TCP port 708 open - how to find out by which program? Yalla-One Slackware 2 03-25-2006 10:12 AM
Setting a default program to open certain file types in Gnome danran Debian 3 10-12-2005 10:07 PM
cannot SFTP to SUSE 9.2 box, port 22 open, can putty in though using same port. jgrady Linux - Networking 6 03-29-2005 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration