View previous topic :: View next topic |
Author |
Message |
dudds n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Dec 2003 Posts: 28
|
Posted: Fri Feb 06, 2004 4:39 pm Post subject: Port problem |
|
|
I was trying to set Xvnc to run on port 21 instead of the default so that I can get a remote session to my Linux box from work. For some reason port 21 seems to the only one I can find that gets through our firewall. Anyways when I run the command Xvnc -rfbport 22 :4 as myself I get the following error message:
07/02/04 02:38:40 Xvnc version 3.3.7 - built Feb 5 2004 20:29:26
07/02/04 02:38:40 Copyright (C) 2002-2003 RealVNC Ltd.
07/02/04 02:38:40 Copyright (C) 1994-2000 AT&T Laboratories Cambridge.
07/02/04 02:38:40 All Rights Reserved.
07/02/04 02:38:40 See http://www.realvnc.com for information on VNC
07/02/04 02:38:40 Desktop name 'x11' (starbug:4)
07/02/04 02:38:40 Protocol version supported 3.3
07/02/04 02:38:40 Listening for VNC connections on TCP port 22
07/02/04 02:38:40 ListenOnTCPPort: Permission denied
However, when I run the same command as root I don't get any errors. What gives?? I guess I could just run as root, but I want to understand why I get the permission denied for port 21.
By the way if I don't specify a port and just use the default I don't have any problems at all.
Cheers,
Dave |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
smart Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Nov 2002 Posts: 455
|
Posted: Fri Feb 06, 2004 5:10 pm Post subject: |
|
|
...
07/02/04 02:38:40 Listening for VNC connections on TCP port 22
...
While you obviously can write, you should practice reading
Otherwise than that, the reason for port 21 being "open" is probably since it's usually used for ftp . With that purpose, it might actually be the case that there is an ftp roxy in between you and those port 21 instance in the outside world. In that case, it might be useless for your purpose. Give it a try, but don't bet too much on it.... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
n0n Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/411cca4b3d4b2d778e09b.jpg)
Joined: 13 Jun 2002 Posts: 355
|
Posted: Fri Feb 06, 2004 6:19 pm Post subject: Re: Port problem |
|
|
dudds wrote: | However, when I run the same command as root I don't get any errors. What gives?? I guess I could just run as root, but I want to understand why I get the permission denied for port 21. |
UNIX systems have historically allowed only root to bind to ports<1024 for listening (or is that <=1024?). There's really no way around this, unless someone knows of some /proc setting or something that I don't know about. It's set up like that for security purposes. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dudds n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Dec 2003 Posts: 28
|
Posted: Sat Feb 07, 2004 7:55 am Post subject: |
|
|
Hey smart thanks for the "smart"arse response. it was of absolutly no use. By the way I did and can read. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
alsaleha n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 07 Feb 2004 Posts: 7 Location: Utah
|
Posted: Sat Feb 07, 2004 8:37 am Post subject: |
|
|
I'm not trying to start any flamewars, but I think you should practice what you preach smart
Quote: |
07/02/04 02:38:40 Listening for VNC connections on TCP port 22
07/02/04 02:38:40 ListenOnTCPPort: Permission denied |
dudds: n0n is correct, as a security measure, port 1024 and less can only be listened on with root permissions. can you run it as a daemon? if so, most daemons will start with root permissions, then give them up once they're listening on the necessary port. _________________ I replaced an end-user with a shell script once:
#! /bin/bash
echo "will coffee hurt it?"
nobody noticed he was missing |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dudds n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 03 Dec 2003 Posts: 28
|
Posted: Sat Feb 07, 2004 9:30 am Post subject: |
|
|
n0n and alsaleha thank's guys for your help. You've put me on the right track.
Cheers,
Dave |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|