Skip to content

Instantly share code, notes, and snippets.

@masarugen
Last active December 15, 2015 18:20
Show Gist options
  • Save masarugen/5303543 to your computer and use it in GitHub Desktop.
Save masarugen/5303543 to your computer and use it in GitHub Desktop.
var http = require('http');
var server = http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
});
server.listen(80, 'localhost', function() {
process.setuid(80); // ここで変更後のuidを指定する
process.setgid(80); // ここで変更後のgidを指定する
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment