You are not logged in.
Hi,
I want to run ruby on rails on port 80 but got permission denied error. I don't want to start server as root so how to add user permissions to start server on port 80? Can you help?
Offline
What have you tried?
A quick google search suggests that setcap can be used to allow certain executables bind to the usually protected ports 1-1023). Other hits suggest redirecting the incoming connection on port 80 to another, unprotected port. Have you tried these suggestions?
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
I saw that i can do some port mapping. But port mapping looks like hack/workaround. It is not enough to add user to proper group?
Offline
As WorMzy aksed: In which way did you try to "run ruby on rails on port 80"?
Offline
I tried to add user to networking group(no success). In google i found solution to map port to 80(didn't try). Port mapping is the only solution?
Offline
Are you trying to run your ruby on rails website as a regular user?
I would suggest running it on a different port (>1023) as a regular user.
Then I would suggest setting up a separate HTTP server (with lighttpd or nginx) that acts as a reverse proxy listening on port 80.
EDIT Of course one could also try to shoehorn one's OS into allowing users to open ports in the range [1-1023], but I thought I'd also give a little more elegant solution.
Last edited by ayekat (2015-11-25 18:10:04)
Offline
Of cource server is working. Now i'm using port 8080. I will look at yours proposition(reverse proxy). Thanks for help.
Offline