Sorry I won't be very helpful on that one, I started again from scratch and 
it's working ok. I'm not even sure it was related to Sorl.

On Thursday, May 24, 2012 4:52:11 PM UTC+2, Chet Pilley wrote:
>
> Are you doing any development work using runserver apart from working 
> on the Apache-delivered site? Sorl uses the server user's account (in 
> the Apache case www-data) to create the hashed directory tree, and if 
> you're using runserver then any directories made with have the 
> ownership of the server user. So if you're doing some development with 
> lrprod1 and "do a quick runserver test" before you deploy then you're 
> going to get some permission inconsistencies. 
>
> By default Sorl gives only the owner write permissions, so groups 
> won't help you here (unless there's a Sorl setting where you can alter 
> this). To get the out-of-the-box functionality you'll need to remove 
> any thumbnails you create during testing, or manually fix the 
> permission on all of resulting directories you make during testing. 
> You'll also run into issues creating thumbnails as lrprod1 during 
> testing because www-data will own most things. 
>
> Hope that helps more than hurts. 
>
> On May 10, 6:33 am, Bastian <bastien.roche...@gmail.com> wrote: 
> > 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/-/t3SdBFSluK0J.
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.

Reply via email to