I recently had to drop the Django development server and moved to apache because of some problems with the html5 video tag.
The change brought a [Errno 13] Permission denied error when trying to upload a video to the media folder.
I have already set the media folder recursively to 777 with chmod and gave permissions to www-data group with chgrp; here is the output when executing ls -lha media/
total 12K
drwxrwxrwx 3 esteban www-data 4,0K 2012-02-22 06:44 .
drwxr-xr-x 10 esteban esteban 4,0K 2012-02-22 07:35 ..
drwxrwxrwx 3 esteban www-data 4,0K 2012-02-13 10:12 generated
I also wrote the following directive in the httpd.conf file:
<Directory /home/esteban/python_projects/video_transform/media>
Options +Indexes
Order allow,deny
Allow from all
</Directory>
This allows me to list the folder contents when browsing to http://localhost/media but no success with the uploads yet.
Any ideas??
EDIT: The exception is thrown in this line:
destination = open('media/' + filename, 'wb+')