• 
      

    Attempt to make directories writable on rb-site upgrade.

    Review Request #5643 — Created March 17, 2014 and submitted

    Information

    Review Board
    release-2.0.x
    55ebefa...

    Reviewers

    When upgrading an existing site, there should be at least one directory
    ("uploaded") that is writable by the web server. We can use this as a
    reference point for all other directories that need to be made writable.

    We now stat that directory and change ownership of all the other
    directories.

    I've also added uploaded/files as a generated directory. Technically,
    this can be created on-the-fly, but since we know we want it, and make
    the other directories, we may as well make this one up-front.

    Created a site. Changed the ownership of a directory, and removed another.
    Upgraded the site, and saw the expected permissions.

    Description From Last Updated

    If you reorder these, you could move the mkdir into the other loop.

    daviddavid

    Should we log something here?

    daviddavid
    david
    1. 
        
    2. reviewboard/cmdline/rbsite.py (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

      If you reorder these, you could move the mkdir into the other loop.

      1. How do you mean?

        The stat will fail if the uploaded directory doesn't already exist. I suppose I could do a separate mkdir for the uploaded directory, then stat, then do the mkdir + chown?

      2. Yeah, I think that would be nice.

    3. reviewboard/cmdline/rbsite.py (Diff revision 1)
       
       
       
      Show all issues

      Should we log something here?

      1. I don't think we need to. This is just a nice helpful thing. If they need to change ownership at install, they'll be told at the end of the install process. If it's an upgrade, they should only hit an error if they're not using a root user, in which case they'll just be told in the Manual Updates check (complete with instructions).

    4. 
        
    chipx86
    david
    1. Ship It!

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed