[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] Process locking
On Sunday 14 January 2001 7:19 pm, you wrote:
> Hello Chris and everyone.
>
> Thanks for the offer of further help.
>
> Here is more information, some of which may not be relevent. Just in
> case, I am including it.
>
> One amateur radio packet program works OK, so I assume that my AX25 is set
> up correctly. This program is only for sending and receiving packet; it
> does not monitor the traffic when not connected. It uses a separate program
> for monitoring, which doesn't work, but gives me an error message: ax25spyd
> not found on port 14090. I can't find anything obvious and have no idea
> what port 14090 is.
>
The program is expecting a server program to have published a connection on
port 14090. If it is not finding it there are 2 possibilities - either the
server program is not running and therefore not publishing the port or it is
and has published it but the system is not allowing connections to that port
- are you denying access to ports using ipchains or tcp-wrappers?
> Yet another monitoring program called "Listen", works when run in ROOT, but
> when run logged in as myself doesn't work but gives the error "socket:
> Operation not permitted". I have looked at the "Listen" permissions and
> they seem OK. Doing a LOCATE shows many sockets and I don't know which to
> look at for possible wrong permissions.
>
It apears to be creating or requiring a "priviledged" port. If you want to
run the program as a user, the simplest is to run the program suid root. The
owner of the program must be root. then execute "chmod u+s Listen". More
secure way is to run it from a "wrapper" program.
> A third packet program which sends, receives and monitors, works in
> ROOT, but nothing when logged in as myself. Again I get the error message
> about socket operation not permitted.
>
Ditto. Program appears to require root priveledges. Change it to SUID root to
run it as a user.
> Finally, the TNT program. When run as ROOT from the KDE shell (which is the
> only way I have found of starting it), I get a screen full of text about
> the program. This screen just says up and the only way I can get rid of it
> is by exiting the shell and typing "tnt" again. This then gives the
> "Device /dev/ttyS0 is locked by process 822. (Different numbers each time)
"Getting rid of it" - I guess you mean killing it rather than letting the
program exit - this will probably mean that the lock file is not deleted when
you killed tnt.
>
> Doing a lsof /dev/ttyS0 gives the following:
>
> COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
> tnt 822 root 3u CHR 4,64 736729
> /dev/ttyS0
>
> I kill the PID and type tnt. This time, no text screen, just the process
> error giving a different number.
>
> When run logged in as myself, the text screen has the line added "No root
> permissions: SHELL command disabled." Then the error messages as before.
> lsof similar with me as the user. If it should be started from a shell, I
> can't find it, and the manual doesn't mention it.
>
Seems you need to run this as SUID root as well - see above.
Good luck
Pieter (G0BSX)
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word
"unsubscribe" in the body of the message.
GNU the choice of a complete generation.