I am attempting to setup django-bft on my CentOS 6.4 server. When running under the dev server I am able to upload the file and it shows up on my server.
However, when running through MOD_WSGI everything about the site works, except for the upload. The file never lands on the server and the application throws an error: Invalid JSON: Environment: Request Method: POST Request URL: http://172.23.77.10/uploader/process/?X-Progress-ID=69e91467a474e2ae156004bcae3d8c75 Django Version: 1.3.7 Python Version: 2.6.6 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.admin', 'bft'] Installed Middleware: ('django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware') Traceback: File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py" in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File "/usr/lib/python2.6/site-packages/django/db/transaction.py" in inner 217. res = func(*args, **kwargs) File "<my project path>/bft/views.py" in process_submission 262. upload_html(request, form.instance) File "<my project path>/bft/views.py" in upload_html 426. upload.save() File "<my project path>/bft/models.py" in save 91. super(File, self).save(*args, **kwargs) File "/usr/lib/python2.6/site-packages/django/db/models/base.py" in save 460. self.save_base(using=using, force_insert=force_insert, force_update=force_update) File "/usr/lib/python2.6/site-packages/django/db/models/base.py" in save_base 543. for f in meta.local_fields if not isinstance(f, AutoField)] File "/usr/lib/python2.6/site-packages/django/db/models/fields/files.py" in pre_save 255. file.save(file.name, file, save=False) File "/usr/lib/python2.6/site-packages/django/db/models/fields/files.py" in save 92. self.name = self.storage.save(name, content) File "/usr/lib/python2.6/site-packages/django/core/files/storage.py" in save 48. name = self.get_available_name(name) File "/usr/lib/python2.6/site-packages/django/core/files/storage.py" in get_available_name 74. while self.exists(name): File "/usr/lib/python2.6/site-packages/django/core/files/storage.py" in exists 218. return os.path.exists(self.path(name)) File "/usr/lib/python2.6/site-packages/django/core/files/storage.py" in path 234. raise SuspiciousOperation("Attempted access to '%s' denied." % name) Exception Type: SuspiciousOperation at /uploader/process/ Exception Value: Attempted access to 'media/temp/09-08-2013/apache_test.txt' denied. The permissions on the file system are 775. User is my personal user, group is apache. Directive in httpd.conf for the directory is: Alias /media/ "<my filesystem path>" <Directory "<my filesystem path>"> Options Indexes AllowOverride None Order deny,allow Allow from all </Directory> When I browse to http://<my server ip>/media I am able to see the index of the directory. I have attempted to set the sticky bit for the group. I have attempted to set the user owner as apache. I have attempted to set permissions on the whole Django site to 777. I have temporarily disabled SELinux. I even temporarily gave the apache user a login, Su'd to the apache user. That user can read and write to the directory in question. I have watched the video here: http://blip.tv/pycon-australia/getting-started-with-apache-mod_wsgi-3859481 Anywhere else I can check? TIA -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. For more options, visit https://groups.google.com/groups/opt_out.