Ticket Change Details
Not logged in
Overview

Artifact ID: 536b5522d7c7d0fb0b61be1e1aee07154828f540
Ticket: c3971eac71a1bd01cc2e47b8c1f2d109b54d5574
fossil breaks if HOME points to read-only directory
User & Date: anonymous 2010-04-16 21:10:14
Changes

  1. comment changed to:
    Try the following:
    
    <pre>
    export HOME=/
    cd /tmp
    fossil new test.fossil
    </pre>
    
    The following message is produced:
    
    <pre>
    fossil: SQLITE_CANTOPEN: cannot open file at source line 26294
    fossil: unable to open database file
    
    If you have recently updated your fossil executable, you might
    need to run "fossil all rebuild" to bring the repository
    schemas up to date.
    </pre>
    
    This example assumes that the logged in user does not have write access to / but does have write access to /tmp.
    This is a contrived example that demonstrates the problem; the actual problem was encountered while attempting to use fossil when running as another user (via sudo), but with the old value of HOME (the default sudo behavior of preserving the original environment).
    
    If instead HOME points to another user's directory that has a .fossil, but the current user does not have write access to it and you attempt to clone (instead of just new) you get:
    
    <pre>
    fossil: SQLITE_READONLY: statement aborts at 19: [INSERT OR IGNORE INTO global_config(name,value)VALUES('repo:/tmp/foo.fos',1)] attempt to write a readonly database
    fossil: attempt to write a readonly database
    INSERT OR IGNORE INTO global_config(name,value)VALUES('repo:/tmp/foo.fos',1)
    
    If you have recently updated your fossil executable, you might
    need to run "fossil all rebuild" to bring the repository
    schemas up to date.
    fossil: SQLITE_ERROR: statement aborts at 2: [ROLLBACK] cannot rollback - no transaction is active
    </pre>
    
    I was expecting fossil to work whether or not it can muck around with ~/.fossil.  vim works whether or not it can write to ~/.viminfo (although it does complain if it can't).
    
  2. foundin changed to: "[7c37b46b12] 2010-04-15 23:53:15 UTC"
  3. private_contact changed to: "ae1a74676bb0d1ac520802109f926567b1637ac7"
  4. severity changed to: "Minor"
  5. status changed to: "Open"
  6. title changed to:
    fossil breaks if HOME points to read-only directory
    
  7. type changed to: "Code_Defect"