One more things, there is Redis installed too. On Thursday, May 10, 2012 1:13:00 PM UTC+2, Bastian wrote: > > I have read the threads, searched google... to no avail. Stuck. > > I have Django running with Apache2 on Debian Squeeze and mod_wsgi in a > WSGIDaemonProcess with user=www-data, my user_media directory belongs to > www-data and is 777, as is the cache directory inside it. And sometimes the > sub-directories inside cache (like d1, f7...) are created by www-data and > sometimes they are created by lrprod1 (which is the system user I use to > host the code). I have no idea why, and it causes some permissions denied > that I cannot workaround with some simple group changing since the > directories are not even writable by group. > I did not install this system myself so I may be missing so basic config > here. But yet I can't understand how the directories could be created by > Django with another user than the one specified in wsgi. I can provide more > info, right now I don't see what. How could I investigate that? > > Here is an example traceback: > > Traceback (most recent call last): > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/core/handlers/base.py", > > line 111, in get_response > response = callback(request, *callback_args, **callback_kwargs) > > File > "/home/lrprod1/apps/project/apache/../src/project/application/project/generic/views.py", > > line 23, in home > context_instance=RequestContext(request)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/shortcuts/__init__.py", > > line 20, in render_to_response > return HttpResponse(loader.render_to_string(*args, **kwargs), > **httpresponse_kwargs) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/loader.py", > > line 188, in render_to_string > return t.render(context_instance) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 123, in render > return self._render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 117, in _render > return self.nodelist.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 744, in render > bits.append(self.render_node(node, context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 757, in render_node > return node.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/loader_tags.py", > > line 127, in render > return compiled_parent._render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 117, in _render > return self.nodelist.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 744, in render > bits.append(self.render_node(node, context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 757, in render_node > return node.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/loader_tags.py", > > line 64, in render > result = block.nodelist.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 744, in render > bits.append(self.render_node(node, context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 757, in render_node > return node.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/defaulttags.py", > > line 311, in render > return self.nodelist_true.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 744, in render > bits.append(self.render_node(node, context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 757, in render_node > return node.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/defaulttags.py", > > line 500, in render > output = self.nodelist.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 744, in render > bits.append(self.render_node(node, context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 757, in render_node > return node.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/templatetags/cache.py", > > line 31, in render > value = self.nodelist.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 744, in render > bits.append(self.render_node(node, context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 757, in render_node > return node.render(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/defaulttags.py", > > line 227, in render > nodelist.append(node.render(context)) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/defaulttags.py", > > line 184, in render > values = self.sequence.resolve(context, True) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 510, in resolve > obj = self.var.resolve(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 653, in resolve > value = self._resolve_lookup(context) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/template/base.py", > > line 698, in _resolve_lookup > current = current() > > File > "/home/lrprod1/apps/project/apache/../src/project/application/project/street/models.py", > > line 265, in thumbnails_of_related_objects > crop="center").url, > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/sorl/thumbnail/shortcuts.py", > > line 8, in get_thumbnail > return default.backend.get_thumbnail(file_, geometry_string, **options) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/sorl/thumbnail/base.py", > > line 61, in get_thumbnail > thumbnail) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/sorl/thumbnail/base.py", > > line 87, in _create_thumbnail > default.engine.write(image, options, thumbnail) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/sorl/thumbnail/engines/base.py", > > line 74, in write > thumbnail.write(raw_data) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/sorl/thumbnail/images.py", > > line 127, in write > return self.storage.save(self.name, content) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/core/files/storage.py", > > line 49, in save > name = self._save(name, content) > > File > "/home/lrprod1/apps/virtual_environments/project/lib/python2.6/site-packages/django/core/files/storage.py", > > line 187, in _save > fd = os.open(full_path, os.O_WRONLY | os.O_CREAT | os.O_EXCL | > getattr(os, 'O_BINARY', 0)) > > OSError: [Errno 13] Permission denied: > '/home/lrprod1/lr_user_media/cache/75/00/75005dc960e794042cf8d5dca0463898.jpg' >
-- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ZkyI0p5foNgJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.