When I create a directory with PHP's mkdir()
, the folders' owner is 'apache'. When I create a directory over FTP, the owner is 'ftpadmin'.
For some strange reason, with PHP's rename()
function I can't move any files into a directory owned by 'apache'. I've chmod()
both the file and the directory to 777 and 0777, but 'apache' refuses to move any files into directories it created. I can have 'apache' move files into an 'ftpadmin' directory. I've tried chmod()
and mkdir()
with 777, 0777, 755, 0755, 1777, 01777 and more.
The directories need to be dynamically generated by my client, and files need to be moved in and out.
The server is a dedicated-virtual server that I have can ssh into and have admin rights to.