No permission to connect to localhost?

Hi, this is my experience using FreeBSD so please be newbie friendly with your replies.:)

Anyway, I am setting a mail server. Just finished installing postfix and when I tested connecting to localhost using this command:

/usr/local/etc/postfix # telnet localhost smtp

I got a prompt saying "Permission denied"

Anyone know how to fix it? I really have no idea about this. Like I said this is my first time using FreeBSD and setting up a mail server. If you could show me how to fix it step by step, I would really appreciate it... Thanks!
 
Permission denied? That doesn't sound like a FreeBSD error message.
Most likely it's generated by postfix or whatever is listening on port 25.
 
Insufficient permissions on /usr/bin/telnet might throw permission denied. Your local firewall not accepting the connection might also give this error. Try telnet on different ports and also try with netcat. Also try to specify 127.0.0.1 instead of localhost.
 
Anything in [cmd=]sockstat -l4p 25[/cmd]? Do you have any form of firewalling enabled?
 
If the port is firewalled one would get either a time out, a connection refused or "no route to host". Not a "permission denied".
 
Aprogas said:
Insufficient permissions on /usr/bin/telnet might throw permission denied. Your local firewall not accepting the connection might also give this error. Try telnet on different ports and also try with netcat. Also try to specify 127.0.0.1 instead of localhost.


/usr/bin/telnet has -r-xr-xr-x permissions. Do I have to change it?
I don't have firewall enabled. Also, changing localhost and ports didn't work.
 
SirDice said:
If the port is firewalled one would get either a time out, a connection refused or "no route to host". Not a "permission denied".

If connection is forbidden by server from which you connect, you will get permission error. Otherwise refused/timeout.
Code:
# ipfw add 50 deny ip from any to any 1000
00050 deny ip from any to any dst-port 1000
# telnet localhost 1000
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Permission denied
telnet: Unable to connect to remote host

frustphil: If same message, you have firewall enabled =)
 
ale said:
What is the output of $ id ?

uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)

I'd like to correct my first post... the prompt said
/usr/local/etc/postfix: Permission denied
I am sorry I assumed one could pin point the problem directly.
 
Wah! ))
You trying to start it?

Then you must put to your /etc/rc.conf file this
Code:
sendmail_enable="NO"                                                       
sendmail_outbound_enable="NO"                                              
sendmail_submit_enable="NO"                                                
sendmail_msp_queue_enable="NO"                                             
postfix_enable="YES"
And then start with this
[cmd=]/usr/local/etc/rc.d/postfix start[/cmd]

UPD: It may be needed to shutdown sendmail before this
 
You're trying to execute a directory, which (under sh, and probably other shells) produces an error message.

E.g.

Code:
[cmd=$]/etc/mail # bla[/cmd]
/etc/mail: Permission denied

Bash would print something slightly more meaningful:

Code:
[cmd=$]/etc/mail # bla[/cmd]
bash: /etc/mail: is a directory

Maybe you copied something from a manual? I'm pretty sure this

[cmd=]/usr/local/etc/postfix # telnet localhost smtp[/cmd]

should be interpreted like this:

Code:
[/usr/local/etc/postfix]# [cmd=]telnet localhost smtp[/cmd]

The first part is simply the directory you're in, the '#' is the prompt, and the 'telnet' part the command.

So try:

[cmd=]telnet localhost smtp[/cmd]
 
I think it's working now but i'm confused. Typing telnet localhost smtp gave me this output:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 http://www.mydomain.com ESMTP Postfix

While /usr/local/etc/postfix # telnet localhost smtp gave the permission denied error.
 
DutchDaemon said:
You're trying to execute a directory, which (under sh, and probably other shells) produces an error message.

E.g.

Code:
[cmd=$]/etc/mail # bla[/cmd]
/etc/mail: Permission denied

Bash would print something slightly more meaningful:

Code:
[cmd=$]/etc/mail # bla[/cmd]
bash: /etc/mail: is a directory

Maybe you copied something from a manual? I'm pretty sure this

[cmd=]/usr/local/etc/postfix # telnet localhost smtp[/cmd]

should be interpreted like this:

Code:
[/usr/local/etc/postfix]# [cmd=]telnet localhost smtp[/cmd]

The first part is simply the directory you're in, the '#' is the prompt, and the 'telnet' part the command.

So try:

[cmd=]telnet localhost smtp[/cmd]

my bad.. i didn't know that. so this is all because of my ignorance...x(
Thank you!:stud
 
Back
Top