7 Commits
Author SHA1 Message Date
Luca Beltrame 2b942d97b2 Address review comments
- move the umask call before the try/except block
- move comment in _prepare_single to the umask call

Simplify the code comments, too.

Tests still pass.
2015-12-07 11:17:29 +01:00
Luca Beltrame edf3a4ed73 Make webroot usable also when running as non-root (GH #1795)
Thanks to @aburch's suggestions, the logic has been changed:

- Set umask before creating folders and files
- Leverage os.makedirs' mode option in conjunction with umask

The program still tries to change owner / group, but in case of errors
it continues gracefully.

Tests have been updated, and they pass.
2015-12-07 10:49:24 +01:00
Luca Beltrame 2a5f539d9a Add tests for testing gid and uid with the webroot plugin
They pass.
2015-11-25 14:26:51 +01:00
Luca Beltrame a58c939c8d Change ownership of the validation paths as well
Match them with the parent directory they're in.
2015-11-25 14:26:00 +01:00
Luca Beltrame c7c1808ad1 Add unit tests for webroot permissions handling
Tested, pass.
2015-11-24 10:15:18 +01:00
Luca Beltrame a71c3ed90c Fix issues from review
- Put chmod argument to os.chmod (oops)
- Add permissions adjustments for challenge files, too
2015-11-24 10:15:18 +01:00
Luca Beltrame 768c7cd9c0 Fix webroot permissions
Take them from the parent directory where the webroot is.Should fix issue #1389
2015-11-22 15:16:50 +01:00