Why can I not access any file or directory created by PHP from FTP-client?
- by user43053
Hello there,
If I create a directory with mkdir(), or create a file with fopen(), file_put_contents() or SimpleXMLElement::asXML(), I am unable to access the file with my FTP-client or c-Panel File Manager.
If I try to delete or edit them, I get errors. Dreamweaver suggests it is a permission problem or a network or filesystem fault (but I've set the permissions with chmod() to 0777, and when I check the cPanel, it confirms chmod 777.
I also tried to use fileowner() and the function returns int(99), the same owner as those files that I could access with my FTP-client.
It seems files and directories created with PHP can only be modified or be deleted with PHP.
I thought this must be a server setup related issue, so I write it here. I am on a shared server, and I have no idea about setting up servers.
Thank you for your time.
Kind regards
Marius