We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27672
    • 168 Posts
    when i try to change my "user photo" i get:

    PHP error debug
    Error: move_uploaded_file(/www/local/sites/www014/4aces.jpeg) [function.move-uploaded-file]: failed to open stream: Permission denied
    Error type/ Nr.: Warning - 2
    File: /www/local/sites/www014/assets/snippets/webloginpe/webloginpe.class.php
    Line: 2527
    Line 2527 source: if (!move_uploaded_file($_FILES[’photo’][’tmp_name’], $userImage))

    the path for the image doesn’t seem correct. "www014" is my site’s root directory. shouldn’t it be trying to move the image to /www/local/sites/www014/assets/snippets/userimages/4aces.jpeg?

    do i have a setting wrong somewhere? or am i mistaken as to where this image is trying to be uploaded? it’s a new install of webloginpe, haven’t messed with anything. thanks!
      • 27442
      • 103 Posts
      You are correct about where the picture ’should be’. However, what actually happens is that is temorarily uploaded to the root of the website, then moved to the image location. What you’re seeing is a permissions problem in the website root.
        • 27672
        • 168 Posts
        terrific, that makes total sense. i’m quite sure my site root folder is not writeable, i’ll have to see about getting that changed. thanks for the insight!
          • 1783
          • 23 Posts
          the same problem here sad

          Is there any other workaround, as changing yor site root to 777 is not safe, is it... ?
            • 27672
            • 168 Posts
            i did not have complete control over this site, the site was setup like this:

            /www001 (not writeable)
            --->index.php (modx)

            so i requested that it be changed to:

            /www001
            --->/public_html (writeable)
            ------>index.php (modx)

            and the www traffic was sent to the /public_html directory, which previously did not exist.
              • 1783
              • 23 Posts
              Thanks for such a quick reply!

              However I’m not quite sure what you’re saying, you kept modx core files outside public_html folder? How does it change the security issue?

              I’ve changed my httpdocs folder to 777 and uplaoding profile images works great, when it was set to 750 didn’t work at all with the same error as above. It happened only after moving site to new server (with Plesk), don’t remmeber what permissions on httpdocs where there before move.
              Why webloginpe requires to set root to 777?
              Is there any workaround so that images are not temporarily saved in root?
                • 27672
                • 168 Posts
                no, the server i was working on with this issue, i did not have access to change the directory that server as the webroot (via my ftp access), so i had to ask that a subdirectory be created, which i could access. and i did change that to 777.