Larry Martell
2012-Sep-12 15:52 UTC
[CentOS] django not picking up template change on CentOS
Don't know if anyone here can help me or not, but here's my problem: I have a django app. I develop on a Mac, but it's deployed on CentOS. I've been doing it like this for a long time with no issues. Today I changed a template on my Mac, and the change was picked up, no problem. I checked my change into git, went to a CentOS box, pulled the change down, but django is not picking it up. I've tried everything I can think of - bounced the server, restarted the browser, cleared the cache and cookies, tried 3 different browsers, deleted it, re-pulled from git, but when I look at the code in the debugger, it's clearly using the old template. There are no errors in the apache log, and permissions are fine. One thing I see is that is different is that the dir that has the new template, has no SELinux security context set, whereas all the other dirs do. But SELinux is disabled on this box, so that's probably not it. I've been trying to set the SELinux security context on that dir, just so it's like the others, but I haven't been able to figure out how to do that - I don't know what to pass to chcon. I'm tearing my hair out here. Anyone have any ideas as to what's preventing it from picking up the new template, or what I can check to figure out what's going on? Thanks! -larry
James B. Byrne
2012-Sep-12 20:19 UTC
[CentOS] django not picking up template change on CentOS
On Wed, September 12, 2012 11:52, Larry Martell wrote: I've been trying to set the SELinux> security context on that dir, just so it's like the others, but I > haven't been able to figure out how to do that - I don't know what to > pass to chcon.Well, if SELinux is disabled or set to permissive then the file contexts should not make any difference. However, to reset the contexts to their defaults without resorting /.autorelabel one can do this: # permanent fix restorecon -Rv /path/to/start You might have to add the -F flag as well. I am not sure when this becomes necessary but on occasion I have had to resort to it when dealing with httpd selinux issues. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Daniel J Walsh
2012-Sep-13 15:35 UTC
[CentOS] django not picking up template change on CentOS
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 09/12/2012 11:52 AM, Larry Martell wrote:> Don't know if anyone here can help me or not, but here's my problem: > > I have a django app. I develop on a Mac, but it's deployed on CentOS. I've > been doing it like this for a long time with no issues. Today I changed a > template on my Mac, and the change was picked up, no problem. I checked my > change into git, went to a CentOS box, pulled the change down, but django > is not picking it up. I've tried everything I can think of - bounced the > server, restarted the browser, cleared the cache and cookies, tried 3 > different browsers, deleted it, re-pulled from git, but when I look at the > code in the debugger, it's clearly using the old template. There are no > errors in the apache log, and permissions are fine. One thing I see is that > is different is that the dir that has the new template, has no SELinux > security context set, whereas all the other dirs do. But SELinux is > disabled on this box, so that's probably not it. I've been trying to set > the SELinux security context on that dir, just so it's like the others, but > I haven't been able to figure out how to do that - I don't know what to > pass to chcon. > > I'm tearing my hair out here. Anyone have any ideas as to what's preventing > it from picking up the new template, or what I can check to figure out > what's going on? > > Thanks! -larry _______________________________________________ CentOS > mailing list CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >If SELinux is disabled, then it is not the problem. Changing the label on a file will have no effect. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBR/VkACgkQrlYvE4MpobP6XwCgy4vZ/JBNcXp5cPyfIHjX+6kI bf4An2DK6fDjazO6JPGq+/sEBccpazjV =F1mL -----END PGP SIGNATURE-----