Production question disallow_file_mods / writing to the uploads directory


Is there a way to have DISALLOW_FILE_MODS = true but then make an exception for a specific plugin?

I’m using mergebot and its trying to write a file to


and its failing:

[03-Jan-2018 13:58:09 UTC] PHP Warning: fopen(/srv/www/
5221/web/app/uploads/mergebot/mergebot-deployment-100.sql): failed to open stream: Permission denied i
n /srv/www/
hp on line 9

My solution was to chmod -R a+rwx uploads/mergebot

Is there another way



You shouldn’t need to change DISALLOW_FILE_MODS in order for the plugin to be able to write to the uploads folder.

Seems like you just had bad permissions on the uploads folder?

1 Like

That’s correct – it was a bad permissions issue.