Ok all my files and folders are set as owner of vsftpd:nogroup. FTP program can upload and create and do everything. But when I use the PHP command mkdir, I get a Permission Denied even though the folder its creating it in is set to chmod 777. IF i set the base folder to user www-data and group www-data, PHP mkdir will work. However, I can't use FTP to delete or upload to that folder.

/uploads is base folder.

I use PHP mkdir to create a directory in there:

PHP Code:
if (!is_dir($_SERVER['DOCUMENT_ROOT'] . "/uploads/" $_REQUEST['clientID'] . '/video/')) {
    @
mkdir($_SERVER['DOCUMENT_ROOT'] . "/uploads/" $_REQUEST['clientID'] . '/video/'0777);

If /uploads is vsftpd:nogroup then PHP mkdir will give a Permission Denied error.

If /uploads is www-data:www-data then PHP mkdir WILL work, but I cant continue to FTP anything in that folder that was just created.

If /uploads is vsftpd:www-data then PHP mkdir will give a Permission Denied error.

The username I use to FTP into the server is piagency.
The username for this vhost is clients.thepiagency.com

How can I create a directory with PHP and still be able to access it via FTP?

If I have to assign people to multiple groups, how do i do that exactly? I started messing with usermod but I was afraid I would reassign someone incorrectly.