So here's my issue:
I call PHP code:
mkdir("new_dir", 0777); (sets to 775.. not sure why)
This creates my folder, however when I log in using my ftp user to add documents to my new directory(apache owned) I get:
Error code: 3
Error message from server: Permission denied
Request code: 3
I've been able to chown using root to "ftp_user" but that doesn't help the next time my PHP code adds another folder (apache owned).
I've tried changing the ownership through PHP code with...
exec("chown -R ftp_user new_dir")
still no luck.
I've tried logging in as root and usermod to add ftp_user to apache group.. no luck.
What am I doing wrong? I just want my ftp_user to be able to add stuff to my php/apache generated folders.