PHP Script uploads and MkDir - owner/group problem means FTP cant access files

Hi there, was tricky trying to condense my question for the subject title :slight_smile:

Basically I have a script that takes a ZIP file from a user, decompresses it on the server, creates a new directory, puts the decompressed files there and then generates thumbnails.

All is well and it works great, but if there is an error, a file is wrong or something like that I cant manually go in via FTP and yank that file out to replace it, delete it or overwrite it.

Seems any disk work done by PHP is under the guise of a certain user and going in after the fact with FTP or even cPanel’s file manager doesnt work as Im not allowed to touch anything.

Is there anyway to sort this so when my scripts are creating things, folders or files, that I can go in later and ammend?

Many thanks for your help,

Rik

the PHP ‘user’ (usually www or apache, or nobody) should have access to chown the files that it itself created.

[FPHP]chown[/FPHP]

Only works when logged in as root