When I run an AWS EC2 instance node server port number 25, I’m getting:
Error: listen EACCES: permission denied 0.0.0.0:25
I’m trying to enable sudo users command but not working for me.
May I know any possible way to fix this issue?
When I run an AWS EC2 instance node server port number 25, I’m getting:
Error: listen EACCES: permission denied 0.0.0.0:25
I’m trying to enable sudo users command but not working for me.
May I know any possible way to fix this issue?
2
Answers
The error you’re encountering, Error: listen EACCES: permission denied 0.0.0.0:25, typically occurs when your application tries to bind to a low-numbered port (below 1024), which on most Unix-like systems (including Linux distributions used by AWS EC2 instances) requires administrative (root) privileges.
I would suggest to change the Port, If you do not specifically need to use port 25 (commonly used for SMTP), consider using a higher-numbered port that does not require elevated privileges.
From Remove port 25 restriction from an EC2 instance | AWS re:Post:
You can request that the restriction be removed, but the easiest method is to use a different port on your email server.