Jump to content

Which file permissions are needed for upload?


Nico Knoll
 Share

Recommended Posts

Site folder shouldn't require 777, and I'd even consider it a bad practice, since strictly speaking PW doesn't need that. Combined with improper filtering of user input, for an example, it could lead to very severe security issues (injecting code into template files, altering config file etc.)

What errors (if any) are you getting in the developer console of [insert your browser here]? What about Apache and/or PW error log?

Edit: especially if you're running in a shared hosting environment (you're not, right?) you should be extremely cautious about giving "others" write access to anything. Just saying :)

Edited by teppo
Link to comment
Share on other sites

Strange. Would've expected something to show up in error log if upload fails, as it seems to have done. Some things you might want to check at this point:

  1. Double check that /site/assets/files/1143/ has write access to whoever Apache is running as (or 777, if you really need to -- although I've actually encountered some hosts that, as a security measure, specifically won't work with chmod 777.. but in that case an error should definitely be triggered)
  2. Watch your browsers console and net panels while doing the upload; something should show up there also.
  3. Check if your file could be too large for PHP to handle or somehow malformed (very unlikely, if it's just an ordinary image)
  4. Make sure that you're watching the right error log (seriously, I've made this mistake more than once.. watched general Apache error log while site logs were actually being saved in their respective directories etc.. :))
  5. Try uploading files to other pages / other files to this page; is the error consistently there or does it only exist a) on this page or b) with this file? What if you try with a different browser, is the problem still there?

Sorry for not being able to pinpoint the problem right away. File-related quirks can be really, really annoying at times :)

Link to comment
Share on other sites

I'm not aware of any issues with drag-n-drop uploads in Firefox. Just tested (15.0.1) and works well here at least.

Nico by any chance are you using Safari? I know for certain that drag-drop uploads don't work there, because Safari doesn't implement the HTML5 APIs to support it.

Link to comment
Share on other sites

For the record, I'm on a linux installation using FF 16 but I've seen this problem as far back as 14. PW is 2.2.9 and disabling all the extensions in FF doesn't solve it.

I'm now wondering which firefox config setting I've mucked up that might stop JS in FF receiving dropped files as Linux is clearly capable of handing off such information to Chromium.

Link to comment
Share on other sites

Nico by any chance are you using Safari? I know for certain that drag-drop uploads don't work there, because Safari doesn't implement the HTML5 APIs to support it.

Ryan, just for the record, Apple seems to support the file api now in Safari 6, I uploaded a file some minutes ago with drag-drop and it worked. Caniuse.com also lists the File API as supported on Safari 6: http://caniuse.com/#search=File%20API

  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I have been using IE10 preview release for Windows 7 today and used it during site development (includes little content work).

Good news: drag & drop uploads do work in IE10.

Bad news: it seems to work very well on all around PW... that means no superfun IE bug hunting ahead... :(

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...