Roundup Tracker - Issues

Issue 836965

classification
File permission problem causes traceback
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed works for me
:
: richard : richard, tepperly
Priority: normal :

Created on 2003-11-06 03:15 by tepperly, last changed 2003-11-11 22:11 by richard.

Messages
msg1037 Author: [hidden] (tepperly) Date: 2003-11-06 03:15
I am getting tracebacks when I submit a change to
issues. I am using MySQL as the backend. apache is
calling the CGI script, and it runs as user apache.

Despite the traceback, it seems to apply the change.

What are the db/indexes/* files for? Are the doing
something that MySQL could be doing?

Thanks.

% groups apache
apache : apache babel-bugs


% ls -al db/indexes/
total 168
drwxrwsr-x    2 root     babel-bugs     4096 Nov  5 16:50 .
drwxrwsr-x    4 root     babel-bugs     4096 Nov  5
13:56 ..
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db_
-rw-rw-r--    1 babel-bugs babel-bugs      153 Nov  5
16:50 index.db-
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db#
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db0
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db1
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db2
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db3
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db4
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db5
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db6
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db7
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db8
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.db9
-rw-rw-r--    1 babel-bugs babel-bugs       82 Nov  5
16:50 index.dbA
-rw-rw-r--    1 babel-bugs babel-bugs      101 Nov  5
16:50 index.dbB
-rw-rw-r--    1 babel-bugs babel-bugs       62 Nov  5
16:50 index.dbC
-rw-rw-r--    1 babel-bugs babel-bugs       66 Nov  5
16:50 index.dbD
-rw-rw-r--    1 babel-bugs babel-bugs       90 Nov  5
16:50 index.dbE
-rw-rw-r--    1 babel-bugs babel-bugs       78 Nov  5
16:50 index.dbF
-rw-rw-r--    1 babel-bugs babel-bugs       79 Nov  5
16:50 index.dbG
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbH
-rw-rw-r--    1 babel-bugs babel-bugs       55 Nov  5
16:50 index.dbI
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbJ
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbK
-rw-rw-r--    1 babel-bugs babel-bugs       77 Nov  5
16:50 index.dbL
-rw-rw-r--    1 babel-bugs babel-bugs       69 Nov  5
16:50 index.dbM
-rw-rw-r--    1 babel-bugs babel-bugs       63 Nov  5
16:50 index.dbN
-rw-rw-r--    1 babel-bugs babel-bugs       59 Nov  5
16:50 index.dbO
-rw-rw-r--    1 babel-bugs babel-bugs       69 Nov  5
16:50 index.dbP
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbQ
-rw-rw-r--    1 babel-bugs babel-bugs       55 Nov  5
16:50 index.dbR
-rw-rw-r--    1 babel-bugs babel-bugs      112 Nov  5
16:50 index.dbS
-rw-rw-r--    1 babel-bugs babel-bugs      101 Nov  5
16:50 index.dbT
-rw-rw-r--    1 babel-bugs babel-bugs       68 Nov  5
16:50 index.dbU
-rw-rw-r--    1 babel-bugs babel-bugs       53 Nov  5
16:50 index.dbV
-rw-rw-r--    1 babel-bugs babel-bugs       70 Nov  5
16:50 index.dbW
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbX
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbY
-rw-rw-r--    1 babel-bugs babel-bugs       37 Nov  5
16:50 index.dbZ
-rw-rwSr--    1 root     babel-bugs        2 Nov  5
13:53 version
%




IOError: [Errno 13] Permission denied:
'/var/roundup/trackers/babel/db/files/msg/0/msg3.tmp'
Python 2.2.1
/usr/bin/python

A problem occurred while running a Python script. Here
is the sequence of function calls leading up to the
error, with the most recent (innermost) call first. The
exception attributes are:
      __doc__ = 'I/O operation failed.'
      __getitem__ = <bound method IOError.__getitem__
of <exceptions.IOError instance at 0x83dd564>>
      __init__ = <bound method IOError.__init__ of
<exceptions.IOError instance at 0x83dd564>>
      __module__ = 'exceptions'
      __str__ = <bound method IOError.__str__ of
<exceptions.IOError instance at 0x83dd564>>
      args = (13, 'Permission denied')
      errno = 13
      filename =
'/var/roundup/trackers/babel/db/files/msg/0/msg3.tmp'
      strerror = 'Permission denied'

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/backends/blobfiles.py
in storefile(self=<myroundsql 0x83d4cec>,
classname='msg', nodeid='3', property=None,
content='The cron job that fetched the email was wrong.')
   79 
   80         # open the temp file for writing
   81         open(name + '.tmp', 'wb').write(content)
      global open = undefined, name =
'/var/roundup/trackers/babel/db/files/msg/0/msg3',
global write = undefined, content = 'The cron job that
fetched the email was wrong.'
   82 
   83         # save off the commit action

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/backends/rdbms_common.py
in create(self=<hyperdb.Class "msg">,
**propvalues={'author': '3', 'date': <Date
2003-11-06.03:06:34>, 'summary': 'The cron job that
fetched the email was wrong.'})
 2071 
 2072         # store off the content as a file
 2073         self.db.storefile(self.classname, newid,
None, content)
      self = <hyperdb.Class "msg">, global db =
undefined, global storefile = undefined, global
classname = undefined, newid = '3', global None =
undefined, content = 'The cron job that fetched the
email was wrong.'
 2074         return newid
 2075 

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/cgi/client.py
in
_createnode(self=<_roundup_tracker_1.interfaces.Client
instance>, cn='msg', props={'author': '3', 'content':
'The cron job that fetched the email was wrong.',
'date': <Date 2003-11-06.03:06:34>})
 1202         # create the node and return its id
 1203         cl = self.db.classes[cn]
 1204         return cl.create(**props)
      cl = <hyperdb.Class "msg">, global create =
undefined, props = {'author': '3', 'content': 'The cron
job that fetched the email was wrong.', 'date': <Date
2003-11-06.03:06:34>}
 1205 
 1206     # 

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/cgi/client.py
in
_editnodes(self=<_roundup_tracker_1.interfaces.Client
instance>, all_props={('issue', '2'): {}, ('msg',
'-1'): {'author': '3', 'content': 'The cron job that
fetched the email was wrong.', 'date': <Date
2003-11-06.03:06:34>}}, all_links=[('issue', '2',
'messages', [('msg', '-1')]), ('issue', '2', 'files',
[('file', '-1')]), ('msg', '-1', 'files', [('file',
'-1')])], newids=None)
 1150 
 1151                 # make a new node
 1152                 newid = self._createnode(cn, props)
      newid = undefined, self =
<_roundup_tracker_1.interfaces.Client instance>, global
_createnode = undefined, cn = 'msg', props = {'author':
'3', 'content': 'The cron job that fetched the email
was wrong.', 'date': <Date 2003-11-06.03:06:34>}
 1153                 if nodeid is None:
 1154                     self.nodeid = newid

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/cgi/client.py
in
editItemAction(self=<_roundup_tracker_1.interfaces.Client
instance>)
 1001         # handle the props
 1002         try:
 1003             message = self._editnodes(props, links)
      message = undefined, self =
<_roundup_tracker_1.interfaces.Client instance>, global
_editnodes = undefined, props = {('issue', '2'): {},
('msg', '-1'): {'author': '3', 'content': 'The cron job
that fetched the email was wrong.', 'date': <Date
2003-11-06.03:06:34>}}, links = [('issue', '2',
'messages', [('msg', '-1')]), ('issue', '2', 'files',
[('file', '-1')]), ('msg', '-1', 'files', [('file',
'-1')])]
 1004         except (ValueError, KeyError,
IndexError), message:
 1005             self.error_message.append(_('Apply
Error: ') + str(message))

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/cgi/client.py
in
handle_action(self=<_roundup_tracker_1.interfaces.Client
instance>)
  563                 raise ValueError, 'No such action
"%s"'%action
  564             # call the mapped action
  565             getattr(self, method)()
      global getattr = undefined, self =
<_roundup_tracker_1.interfaces.Client instance>, method
= 'editItemAction'
  566         except Redirect:
  567             raise

/usr/local/roundup-0.6.2/lib/python2.2/site-packages/roundup/cgi/client.py
in
inner_main(self=<_roundup_tracker_1.interfaces.Client
instance>)
  285         except:
  286             # everything else
  287             self.write(cgitb.html())
      self = <_roundup_tracker_1.interfaces.Client
instance>, global write = undefined, global cgitb =
<module 'roundup.cgi.cgitb' from
'/usr/local/rou...b/python2.2/site-packages/roundup/cgi/cgitb.pyc'>,
global html = undefined
  288 
  289     def clean_sessions(self):

 
msg1038 Author: [hidden] (tepperly) Date: 2003-11-06 03:16
Logged In: YES 
user_id=94539

% uname -a
Linux somewhere.org 2.4.20-20.8smp #1 SMP Mon Aug 18
14:39:22 EDT 2003 i686 i686 i386 GNU/Linux

I am using roundup-0.6.2.
msg1039 Author: [hidden] (richard) Date: 2003-11-06 03:59
Logged In: YES 
user_id=6405

Note that the permission problem is in the files/msg folder of the  
tracker db, not the indexes folder. What are the permissions 
there?
msg1040 Author: [hidden] (tepperly) Date: 2003-11-06 06:24
Logged In: YES 
user_id=94539

[epperly@somewhere]$ ls -alR
.:
total 12
drwxrwsr-x    3 root     babel-bugs     4096 Nov  5 15:54 .
drwxrwsr-x    4 root     babel-bugs     4096 Nov  5 13:56 ..
drwxrwsr-x    3 root     babel-bugs     4096 Nov  5 16:40 msg
 
./msg:
total 12
drwxrwsr-x    3 root     babel-bugs     4096 Nov  5 16:40 .
drwxrwsr-x    3 root     babel-bugs     4096 Nov  5 15:54 ..
drwxrwsr-x    2 babel-bugs babel-bugs     4096 Nov  5 20:20 0
 
./msg/0:
total 20
drwxrwsr-x    2 babel-bugs babel-bugs     4096 Nov  5 20:20 .
drwxrwsr-x    3 root     babel-bugs     4096 Nov  5 16:40 ..
-rw-rw-r--    1 babel-bugs babel-bugs      290 Nov  5 16:40 msg1
-rw-rw-r--    1 babel-bugs babel-bugs       42 Nov  5 16:50 msg2
-rw-rw-r--    1 babel-bugs babel-bugs       29 Nov  5 20:20 msg3
[epperly@somewhere files]$
msg1041 Author: [hidden] (richard) Date: 2003-11-06 06:39
Logged In: YES 
user_id=6405

That does look correct. I'm not sure why apache can't write to the 
message file. Have you restarted apache since the group changes? Or 
perhaps a reboot would be needed (though I doubt it)? 
 
In the midst of all that, I missed a couple of other points: 
1. the indexes are used for full-text searching, 
2. it's intended that MySQL (and the other RDBMSes) implement their 
own full-text searching in the next (0.7) release. 
 
msg1042 Author: [hidden] (tepperly) Date: 2003-11-07 04:05
Logged In: YES 
user_id=94539

I "solved" the problem by "roundup_server" and reverse
proxying for apache.
msg1043 Author: [hidden] (richard) Date: 2003-11-07 04:21
Logged In: YES 
user_id=6405

Out of curiosity - who is the server running as? :) 
 
msg1044 Author: [hidden] (tepperly) Date: 2003-11-07 04:29
Logged In: YES 
user_id=94539

The server is run as a normal user "babel-bugs" who is a
member of group "babel-bugs". babel-bugs also runs a cronjob
to process email.

I am most deploying roundup to see if I can get babel users
to submit bugs to a bug tracking system rather than sending
email to me. :-) Hardly anyone uses the bugzilla system we
set up due to the fact that you need to login to do
anything. People prefer sending email.
msg1045 Author: [hidden] (richard) Date: 2003-11-11 22:11
Logged In: YES 
user_id=6405

Weird... no idea why apache, belonging to the same group, wouldn't 
have the correct perms. Thanks for poking into the problem though. 
 
History
Date User Action Args
2003-11-06 03:15:00tepperlycreate