PHP file creation problem - ownership
| From: | gordonisnz at gmail dot com | Date: | Sun, 25 Jun 2023 00:02:04 +0000 |
| Subject: | PHP file creation problem - ownership | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-328226@lists.php.net to get a copy of this message | ||
Hi, I've come across an odd problem which I've never had before.
I've got a domain, with multiple subdomains. everything going OK with all
my FOPEN / FWRITE commands.
Now, I've started a new subdomain, and come across a situation where
the PHP script "owner" is different from the owner of the subdirectory, and
I cannot write to that folder.
$log.="USER '".get_current_user()."'\n";
As I said I've never had this prob before & my other scripts do not bother
with checking/changing ownership.
I've Googled and can see how to change the owner of an EXISTING file.
However, how do you change the owner of a file yet to be created - so it's
the same as the file structure and allow upload?
PS I am the *ONLY* FTP user for this account/website.
--
Gordon.