Automatic Site Builder Can not Create Locally .htaccess Files

I have a wander dialog with PHP code that builds a site.

The user is roaming with id:

uid = 900 (wanderer) gid = 900 (wanderer) = 900 (wanderer), 27 (south), 1002 (admin)

The parent directory in question exists, but when attempting to create an .htaccess file, the code declares that the directory is not writable (but recognizes that it exists).

Directory permissions are drwxrwxr-x. And the owner / group are 1001 and vagrant_group respectively.

Another PHP code, executed during the configuration, successfully creates files and directories in the directory in question. This problem occurs only when you try to create a .htaccess file.

Any ideas on why this is happening?