Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2344 by aldu...@gmail.com: post-review crashes if the home directory is not writable
http://code.google.com/p/reviewboard/issues/detail?id=2344

* NOTE: Do not post confidential information in this bug report. *
*       If you need immediate support, please contact            *
*       reviewbo...@googlegroups.com                             *

What version are you running?
RBTools 0.3.2

What's the URL of the page containing the problem?


What steps will reproduce the problem?
1. Log in as user without write permission in $HOME folder
2. Attempt to use post-review


What is the expected output? What do you see instead?

Expected Output: None

Actual Output:
Traceback (most recent call last):
  File "/usr/bin/post-review", line 7, in ?
    sys.exit(
File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 3794, in main File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 3415, in tempt_fate File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 672, in set_review_request_field File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 991, in api_put File "/usr/lib/python2.4/site-packages/RBTools-0.3.2-py2.4.egg/rbtools/postreview.py", line 938, in http_put
  File "/usr/lib64/python2.4/_MozillaCookieJar.py", line 117, in save
    f = open(filename, "w")
IOError: [Errno 13] Permission denied: '/var/www/.post-review-cookies.txt'


What operating system are you using? What browser?

Redhat 5, No browser


Please provide any additional information below.

The following fix from Bug #1557 needs to be expanded to new places in reviewboard.py where self.cookie_jar.save(self.cookie_file) is used.

     rsp = urllib2.urlopen(url).read()
-    self.cookie_jar.save(self.cookie_file)
+    try:
+        self.cookie_jar.save(self.cookie_file)
+    except IOError, e:
+        debug('Failed to write cookie file: %s' % e)
     return rsp

--
You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To post to this group, send email to reviewboard-issues@googlegroups.com.
To unsubscribe from this group, send email to 
reviewboard-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/reviewboard-issues?hl=en.

Reply via email to