Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use Glassfish Stack to manage applications. I run Glassfish on CentOS with non-root user. Therefor I am not able to open 80 port as the ports under 1024 are accessibly only by root users.

There is a solution to add privilege in role based access control (rbac) system to user which runs the glassfish server:

/usr/sbin/usermod -K defaultpriv=basic,net_privaddr *glassfish*

In CentOS the usermod command doesn't include the -K option to change the default privileges. However, the RBAC is supported in CentOS (as far as I understand). Is there any solution to give simple user access to network listening under 1024 port?

share|improve this question
up vote 3 down vote accepted

That RBAC command/privilege is Solaris specific.

Since you're using CentOS, I doubt you're using a new enough kernel (at least 2.6.24) that supports the cleanest solution which involves setpcap. Using iptables to redirect port 80 might be your best bet.

For reference, see this stackoverflow question.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.