I haven't done much work with mkdir() or chmod() so please bare with me.

Here is the code that I have:

$path = $DOCUMENT_ROOT . "/FolderName/";

Line 16: chmod($path,0777);

Line 17: mkdir($path.$pg_Name,0777);

Line 18: chmod($path,0755);

And here is the errors I get


Warning: chmod failed: Operation not permitted in /home/dlonline/public_html/test/test.php on line 16

Warning: MkDir failed (Permission denied)in /home/dlonline/public_html/test/test.php on line 17

Warning: chmod failed: Operation not permitted in /home/dlonline/public_html/test/test.php on line 18

Now I understand the "Permission denied on line 17", so that is why I added the chmod() and then I got the "Operation not permitted..." Is this something that my ISP has set or is there something I did wrong or can I do something to make this work?

Thanks for any help given on this matter!!

    PHP is typically an Apache module, which means it has the access privileges of a walnut.

    If you need to chmod a directory to 0777, then you need to login with FTP or Shell and do so.

      Can do this using the PHP's FTP functions or will I just have to do it manually?

      Thanks for the reply.

        Write a Reply...