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

As root in a CentOs 6.4 server I got this error in an application:

Fri May 16 01:45:23 2014 Error: Terminating since out of inotify watches.
Consider increasing /proc/sys/fs/inotify/max_user_watches

But when I try to run the command as root I got permission denied.

# echo 100000 > /proc/sys/fs/inotify/max_user_watches
-bash: /proc/sys/fs/inotify/max_user_watches: Permission denied

Even if I edit the /etc/sysctl.conf I get permission denied:

# echo fs.inotify.max_user_watches=524288 | tee -a /etc/sysctl.conf
# sysctl -p
error: permission denied on key 'fs.inotify.max_user_watches

How can I solve this?

share|improve this question
up vote 6 down vote accepted

I found the answer.

This server is a VPS and it is running in a OpenVZ container and I'm not allowed to modify any kernel parameter of that container.

share|improve this answer
Ok, me too. So how do you fix it? – BlackCow Jun 30 '15 at 0:05
If there's no option on your server provider control panel, try contact your server provider support for that. – Samuel G. P. Jun 30 '15 at 20:44

Give this a try, you can have the issue even running as root, is not related to wich user you use.

sudo /sbin/sysctl -p
share|improve this answer
The question explicitly mentioned that he go the error message while running as root. – kasperd Apr 20 at 14:15
Updated my answer, since it doesn't matter if you are root, I have experienced this issue. – Mariano Argañaraz Apr 20 at 14:31

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.