| 21 | |
| 22 | == Problems getting Trac working with Mandrake 10.1 running at msec 5: == |
| 23 | If Mandrake is running at msec 5, Trac will raise errors like the one below when you attempt to access it from your browser. |
| 24 | |
| 25 | {{{ |
| 26 | Oops... |
| 27 | |
| 28 | Trac detected an internal error: |
| 29 | |
| 30 | malformed database schema - unable to open a temporary database file for storing temporary tables |
| 31 | Traceback (most recent call last): |
| 32 | File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/core.py", line 475, in cgi_start |
| 33 | File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/core.py", line 453, in real_cgi_start |
| 34 | File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/core.py", line 169, in open_environment |
| 35 | File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/Environment.py", line 160, in get_version |
| 36 | File "/home/misc/rpm/tmp/trac-0.7.1-1mdk-buildroot//usr/lib/python2.3/site-packages/trac/Environment.py", line 88, in get_db_cnx |
| 37 | File "/home/misc/rpm/tmp/python-sqlite-0.5.1-1mdk-buildroot//usr/lib/python2.3/site-packages/sqlite/__init__.py", line 61, in connect |
| 38 | File "/home/misc/rpm/tmp/python-sqlite-0.5.1-1mdk-buildroot//usr/lib/python2.3/site-packages/sqlite/main.py", line 445, in __init__ |
| 39 | DatabaseError: malformed database schema - unable to open a temporary database file for storing temporary tables |
| 40 | |
| 41 | }}} |
| 42 | |
| 43 | If you reduce msec to 3, Trac will work as it should. The problem is, sqlite cannot create temp files in /tmp at msec 5 because /tmp is set to 1733. I tried to work around this by giving apache rwx privileges on /tmp by using acl like so: |
| 44 | |
| 45 | {{{ |
| 46 | setfacl -m u:apache:rwx /tmp |
| 47 | }}} |
| 48 | |
| 49 | That worked until the next time msec swept through the filesystems and reset the permissions back to what they were defined to be in /usr/share/msec/perm.5 . |
| 50 | |
| 51 | That would change the acl mask, which would, once again, result in Trac raising errors like the one above. The solution, as imperfect as it is, is to create a file /etc/security/msec/perm.local into which the following should be entered. |
| 52 | |
| 53 | {{{ |
| 54 | /tmp/ root.root 1777 |
| 55 | }}} |
| 56 | |
| 57 | This specifies an exception to the default permissions defined in /usr/share/msec/perm.5, which prevents msec from changing the permissions on /tmp as it periodically sweeps through the filesystem. |