What’s NonRootPortBinding? I just want to run my web server on port 443!

In the Unix world, privileged ports are 1-1024. As a non-root user, you’re not allowed to start a service and listen on them.

So, how do web servers work then? They usually use ports 80 and 443.

There are a few ways around this. The most common is that the process is started as root and then downgraded.

If you want to start a process without ever having root access though, the way to do it is with NonRootPortBinding. You can find information about it using Apache here.

Basically, for any process you want to start on a port under 1025, you can run:

setcap cap_net_bind_service=+ep <path to binary> 

Following that, you can confirm that you’ve set the correct permission by running:

getcap <path to binary> 

It should return with: cap_net_bind_service+ep

When you patch or update the binary, you will need to rerun the setcap command.

Hope this helps!

Love and breakup and love again

Here are a couple of videos that I find profound and very interesting. Unsurprisingly, they’re videos from a couple of my favorite Chinese actresses.

The first one is with Li Yitong 李一桐. I’ve been a fan of hers since seeing her in The Legend of the Condor Heroes. http://www.iqiyi.com/lib/m_208895914.html. In this video, she does a great narrative about breakup. Please watch the video if you could. The gist of it is that you should enjoy what you have. While you’re enjoying it however, you might be too busy enjoying it that you’re not spending the time to cherish it. You also don’t think you’ll ever lose it. Over time, things change and people drift apart. For her, he had known all of her weaknesses, all but one. Her biggest fear however was knowing one day that she wasn’t able to marry the guy. Well, she’s gotten used to not having him. Moving on, she wishes him well, thanks him for the memories and thanks him for allowing her to love her. Basically, be grateful. How profound!

With Athena, this was a quick replay of A Chinese Odyssey Part One: Pandora’s Box 西遊記第壹佰零壹回之月光寶盒, a film that I’ve seen a couple of times and undoubtedly will watch at least couple more. Also about love – interesting that she says that if you’re not in a loving relationship, leave. There’s someone else out there that’s waiting for you. I certainly hope that’s true. I don’t know if it is, but I do think it’s a beautiful story.

Sorry there are no English subtitles. If you have a link with some, please let me know in the comments and I’ll update the link.