1) Login to WHM admin panel.
2) Go to Security --> security centre.
3) Select the option PHP open_basedir Tweak.
4) By default, this option is enabled for all the domains. Tick the domain that you want to be excluded from this security.
However, this option is not recommended on a shared server.