thegooglecodearchive / django-filebrowser

Automatically exported from code.google.com/p/django-filebrowser
Other
0 stars 0 forks source link

IO Error when uploading a file behind apache #324

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install django 1.3 rc1
2. Install django-filebrowser r681 with django-grappelli r1419
3. Run the project behind apache with mod_python and upload a file

What is the expected output? What do you see instead?
One would except a successful upload, but an IO Error is fired with no more help

What revision of the FileBrowser are you using?
r681

What version/revision of Django are you using?
r15796

Please provide any additional information below.
 1. I checked that the upload directory has rwx access to the apache user
 2. I also checked with firebug if any HTTP error occurs but none
 3. a POST request is done to /admin/filebrowser/check_file/ and gives the following response: {}

Original issue reported on code.google.com by myn.stud...@gmail.com on 15 Mar 2011 at 12:42

GoogleCodeExporter commented 9 years ago
Looks like there is a HTTP 401 error when the following request is done
"POST /admin/filebrowser/upload_file/ HTTP/1.1" 401

Original comment by amine.ch...@gmail.com on 16 Mar 2011 at 2:25

GoogleCodeExporter commented 9 years ago
you are not using https, right?
are you trying to upload to the server where filebrowser is installed or to a 
different one?

Original comment by sehmaschine on 16 Mar 2011 at 2:49

GoogleCodeExporter commented 9 years ago
Hey, no i'm not using https (saw the related issue)

I'm trying to upload to the same server where filebrowser is set up. Thanks to 
this thread 
http://groups.google.com/group/djangofilebrowser/browse_thread/thread/f523e22645
f27a7a/8422e33163440c8d?lnk=gst&q=upload_file#8422e33163440c8d I was able to 
get it working moving on to mod-wsgi (it was about time)

Thanks to the authors of the thread and to you

Original comment by amine.ch...@gmail.com on 16 Mar 2011 at 3:08

GoogleCodeExporter commented 9 years ago
UPDATE:

Actually it's not mod-wsgi who fixed the issue but the way i configured it:
 mod_python set up was requiring a valid user through basic auth
 mod_wsgi set up wasn't requiring any authentication

When i put authentication clause back in mod_wsgi, i faced the same issue

So my issue was related to apache auth

Original comment by amine.ch...@gmail.com on 16 Mar 2011 at 3:36

GoogleCodeExporter commented 9 years ago
thanks for debugging – I´ll update the docs.

Original comment by sehmaschine on 16 Mar 2011 at 8:12

GoogleCodeExporter commented 9 years ago
No problem for that, here is my dirty workaround in apache virtual host 
configuration:

    <Location "/admin/filebrowser/upload_file/">
        AuthType None
        Require all granted
        Satisfy any
    </Location>
    <Location "/admin/filebrowser/check_file/">
        AuthType None
        Require all granted
        Satisfy any
    </Location>

Please note that I'm not familiar with AuthType None and that allows to keep 
location / under some other AuthType. It may create some security issues but 
since it's a "private" alpha in my case, that's a working workaround.

Original comment by amine.ch...@gmail.com on 16 Mar 2011 at 8:22

GoogleCodeExporter commented 9 years ago
docs are updated (online with the next revision)

Original comment by sehmaschine on 29 May 2011 at 8:31