On our shared hosting, PHP and CGI typically run as your cPanel user (not as a shared nobody user), which keeps file permissions safer between accounts.
Exact behaviour can depend on PHP handler (for example PHP-FPM or CageFS on CloudLinux). If a script cannot write a folder, check ownership and permissions in File Manager, or ask support.