Tom, you might be right about the sticky bit. If I store the tile cache elsewhere, the signal can successfully delete it.
On Thursday, 6 November 2014 10:55:03 UTC-5, Tom Evans wrote: > > On Thu, Nov 6, 2014 at 3:08 PM, Stodge <sto...@gmail.com <javascript:>> > wrote: > > I have a separate daemon running as root that generates cached image > tiles > > per user for a map. For now it creates them under /tmp/tile_cache. When > it > > creates a new tile cache it changes the UID and GID to the apache user > (on > > Fedora) and also gives everyone access to the directory, e.g. > permissions > > are rwxrwxrwx. > > > > My Django app runs under mod_wsgi using Apache. I have a Django view > > triggers a signal and the signal is supposed to delete a cache for the > > requesting user. However, the signal uses os.path.isdir and refuses to > "see" > > the directory. os.path.exists fails to see the directory as well. > Attempts > > to delete the directory using shutils.rmtree also fail because I assume > it > > can't for some reason stat the directory. > > > > I have no idea why the signal can't delete the directory - can anyone > point > > anything obvious out? Thanks > > /tmp always has the sticky bit set, which means only the owner of a > file can remove it, regardless of permissions. > > Cheers > > Tom > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/32c13846-df36-4d40-8f53-a46be9a5861a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.