I have literally spent days searching for a solution to this problem. PHP’s mkdir() function is creating directories with owner/group: apache:apache. There is no way I can work in this directory via FTP because the file doesn’t belong to me.
How in the world am I supposed to create directories and manage files with PHP if the user is always set to apache?
Is there a workaround? Should I create directories via exec() or system() ?
Any help is appreciated.
tundoopani
Solving cross-user access problems between a PHP installation and another sub-system (in this case, FTP) usually involves one of two solutions: running both sub-systems as the same user, or putting both users in a common group.
In any case, the FTP protocol lets you create directories. Why not create them from your FTP client?