Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » image upload/install problem

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1419 Views
  • milazzo
    Avatar
    Community Member
    2 Posts

    image upload/install problem Link to this post

    Greetings,

    I've just downloaded and installed Silverstrip on my local macos x box (on the local Apache server instance). The install went fine, but I can't upload any images. Maybe it's a file permissions error, but I've been through and double checked these and nothing seems amiss.

    The specific error it gives me is:

    FATAL ERROR: copy(/Library/WebServer/Documents/silverstripe/assets/Uploads/Napule.jpg) [function.copy]: failed to open stream: Permission denied
    At line 229 in /Library/WebServer/Documents/silverstripe/sapphire/filesystem/Folder.php

    copy(/var/tmp/phptFXxjy,/Library/WebServer/Documents/silverstripe/assets/Uploads/Napule.jpg)
    line 229 of Folder.php

    Folder->addUploadToFolder(Array)
    line 200 of AssetAdmin.php

    Now..... if I'm write it's looking to copy the image file from the temp file:

    /var/tmp/phptFXxjy

    into my Uploads folder.

    I've checked in my /var/tmp folder and a file named "phptFXxjy" doesn't exist. That could also be a problem.

    However, I can see files it is attempting to upload into this directory (they all have names like of six letters, mixed upper and lower case), but all the files have zero KB - surely that's not right?

    Does anyone have any suggestions? Many thanks.

  • Willr
    Avatar
    Forum Moderator
    5490 Posts

    Re: image upload/install problem Link to this post

    Sounds like the uploads folder doesnt have read / write permissions for your web user. Make sure the user / everyone has those permissions.

  • milazzo
    Avatar
    Community Member
    2 Posts

    Re: image upload/install problem Link to this post

    Many thanks - that was spot on. The /assets folder was owned by "www" but not the Uploads folder. Doing a "chown" to "www" on the Uploads folder fixed the problem.
    Thank you.

    1419 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.