< All Topics

It’s Not Working – things to check

Missing dns_write_post.sh file

When daflare is installed, it creates an almost empty file at /usr/local/directadmin/scripts/custom/dns_write_post.sh

daflare’s actual activation script is stored within the plugins folder, but at present this file needs to exist for the plugin’s script to be called by DirectAdmin. It may be that DirectAdmin removes this requirement in the future.

/…/dns_write_post.sh: 1: -e: not found’

To fix the following error:

/usr/local/directadmin/scripts/custom/dns_write_post.sh: 1: -e: not found’

Edit the file ‘/usr/local/directadmin/scripts/custom/dns_write_post.sh’ and remove the ‘-e ‘ from the beginning of the script. That script should just be left with the following:


Failed Adding Record … CNAME …amazonses.com – DNS Validation Error

Note that some CNAME records are unable to be proxied in Cloudflare. Unfortunately Cloudflare just returns a basic ‘DNS Validation Error’ without a description of why the record couldn’t be added. If this happens, add the CNAME record to a custom configuration for the domain with the proxy set to OFF and try again.

If the error persists, all you can really do is go to Cloudflare and manually add the record and see what extra message Cloudflare gives you.

Unauthorized to access requested resource

If you click on Verify Token and get the message, ‘This API Token is valid and active’, but also get the message, ‘Unauthorized to access requested resource’, this is caused by a missing API Permission.

The permission missing is quite possibly the ‘User -> Read’ permission, which is technically not required to use the plugin, but helps to confirm that you are using the correct token – especially if you have multiple Cloudflare accounts.

Follow the ‘Create an access token’ information on the Setting up Cloudflare page to rectify this.

Cannot use the access token from location

If you click on Verify token and get the message, ‘This API Token is valid and active’, but also get the message, ‘Cannot use the access token from location:’, then your access token is valid, BUT the IP filter you have set is incorrect.

It will most likely be a IPv6 address that it will list as the location you are trying to use the api from. This is the address that needs to be set in your IP filtering settings for your token in Cloudflare.

Incorrect PHP version message

daflare requires PHP version 7.3+

If you get a message saying that you have an incorrect version of PHP, you can easily point daflare to a custom PHP binary.

Domain zone file not found error

If you are running the Debian or FreeBSD distro, you may have come across the following error if you switch the Direct Zone File Access mode to ‘Standard’.

Domain zone file not found - maybe domain has not been created on the server...

Version 0.11.6b or greater fixes this error. Update to this version by going to the DirectAdmin Plugin Manager and click on + next to daflare, then on ‘Update’.

Table of Contents