Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'm using CentOS

uname -a
Linux 3.2.29-48.63.amzn1.x86_64 #1 SMP Sat Sep 15 01:43:12 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

I'm trying to add this command to my /etc/sudoers file using visudo ...

Cmnd_Alias     CHOWNCMD = /bin/chown jboss:jboss /usr/java/jboss/server/default/deploy/myclient*.ear

but when I try and save it is complaining about a syntax error. I can run this command (everything after the "=") on a command line, so I'm having a hard time figuring out what visudo is complaining about. Any suggestions how to modify the above line to get visudo to behave?

  • Dave
share|improve this question
up vote 6 down vote accepted

The colon is the syntax error. Try

Cmnd_Alias     CHOWNCMD = /bin/chown jboss\:jboss /usr/java/jboss/server/default/deploy/myclient*.ear

That validates for me (Fedora 16, sudo 1.8.3p1), and in addition it gives me the privilege to use under sudo.

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.