chown web-server files during installation

Review Request #7784 - Created Nov. 30, 2015 and updated

Stephen Gallagher
Review Board
master
4033
a8305cb...
reviewboard

If the user specifies --web-server-user on the `rb-site install`
CLI or a distribution packager has set a default web server user
in rb_platform.py, `rb-site install` will attempt to chown the
necessary web-facing directories and their contents to that user.

If it succeeds in chowning all such directories, `rb-site install`
will now suppress the summary lines telling the user what
directories need to be manually owned.

If it fails on one or more ownership changes (or if no ownership
change is attempted due to a lack of a user or running on Windows),
then the original notice of directories to update is displayed at
the end of installation.

I deployed several Review Board sites as root against a PostgreSQL database:

  • DEFAULT_WEB_SERVER_USER="" in rb_platform.py, --web-server-user=apache on the CLI
    *- All appropriate directories were owned by apache:apache at the end of deployment. All other directories were owned by root.
  • DEFAULT_WEB_SERVER_USER="" in rb_platform.py, --web-server-user not on the CLI
    *- All directories were owned by root at the end of deployment
  • DEFAULT_WEB_SERVER_USER="apache" in rb_platform.py, --web-server-user not on the CLI
    *- All appropriate directories were owned by apache:apache at the end of deployment. All other directories were owned by root.
  • 1
  • 0
  • 4
  • 1
  • 6
Description From Last Updated
This looks to be basically the same code. Can we iterate over itertools.chain(dirs, files)? Christian Hammond Christian Hammond
Review Bot
Christian Hammond
Stephen Gallagher
Review Bot
Stephen Gallagher
Review request changed

Change Summary:

Rebased this patch atop current master branch

Branch:

-release-2.5.x
+master

Commit:

+a8305cb9f773f103bc534fc21dba48f82ebbfe22

Diff:

Revision 3 (+85 -10)

Show changes

Checks run (2 succeeded)

JSHint passed.
flake8 passed.
Loading...