Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Error can be seen here: http://djaffry.selfip.com:8080/

If i go to the folder /srv/twingle/search and do ls -l I get

-rwxrwxrwx 1 root   root    65142784 May 26 20:28 words.db

I gave it 777 access (absolutely unsafe, I know, but I thought it would atleast work)

any idea what can be the permissions problem?

Edit: A very strange problem is that the code doesn't crash once every few refreshes.. then goes back to crashing

share|improve this question
    
Are you using SELinux? –  Cristian Ciupitu May 27 '10 at 12:00
    
Cristian: How can I check if I'm using it, what are the repercussions of using it? –  tipu May 27 '10 at 12:16
    
What distribution are you using? SELinux adds another layer of security above the traditional layer used by all Unix/Linux systems. –  Cristian Ciupitu May 27 '10 at 12:23
    
Run /usr/sbin/getenforce and check if it's set to Enforcing. –  Cristian Ciupitu May 27 '10 at 12:25
    
yes it's enforcing, [tipu@localhost ~]$ /usr/sbin/getenforce Enforcing –  tipu May 27 '10 at 12:32

1 Answer 1

  1. Does the webserver/mod_python user have r-x on the directory `/srv/twingle/search' e.g. all the way down (look with ls -ld /srv /srv/twingle /srv/twingle/search)
  2. I make it that it works/delivers a page 1 out of 5 times (does that tally in with something, numer of processes or such like?).
  3. Django Version: 1.2.1 pre-alpha is on there. 1.2.1 is released. Is it possible to upgrade to the release version?
share|improve this answer
    
Davey, after running your command: drwxrwxrwx 3 root root 4096 May 23 23:27 /srv drwxrwxrwx 4 root root 4096 May 25 14:32 /srv/twingle drwxrwxrwx 4 root root 4096 May 27 04:12 /srv/twingle/search ` I will update Django. Yes, it works/delivers only 1 out of 5 times and I don't know why –  tipu May 27 '10 at 12:22
    
What happens if you run it up in the built in webserver in django? –  davey May 27 '10 at 12:55
    
davey, that's a good thing to check.. let me see. –  tipu May 27 '10 at 13:04
    
If it were permissions or Christian's suggestion of selinux then it ought to be broken completely/all the time rather than intermittently working. When you run it under the built in you may be using a different userid to when it runs as apache and that may give a clue a to what's wrong. –  davey May 27 '10 at 15:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.