forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitc37b3d0
committed
Allow group access on PGDATA
Allow the cluster to be optionally init'd with read access for thegroup.This means a relatively non-privileged user can perform a backup of thecluster without requiring write privileges, which enhances security.The mode of PGDATA is used to determine whether group permissions areenabled for directory and file creates. This method was chosen as it'ssimple and works well for the various utilities that write into PGDATA.Changing the mode of PGDATA manually will not automatically change themode of all the files contained therein. If the user would like toenable group access on an existing cluster then changing the mode of allthe existing files will be required. Note that pg_upgrade willautomatically change the mode of all migrated files if the new clusteris init'd with the -g option.Tests are included for the backend and all the utilities which operateon the PG data directory to ensure that the correct mode is set based onthe data directory permissions.Author: David Steele <david@pgmasters.net>Reviewed-By: Michael Paquier, with discussion amongst many others.Discussion:https://postgr.es/m/ad346fe6-b23e-59f1-ecb7-0e08390ad629%40pgmasters.net1 parentda9b580 commitc37b3d0
File tree
32 files changed
+661
-127
lines changed- doc/src/sgml
- ref
- src
- backend
- bootstrap
- postmaster
- tcop
- utils
- init
- misc
- bin
- initdb
- t
- pg_basebackup
- t
- pg_ctl
- t
- pg_resetwal
- pg_rewind
- t
- pg_upgrade
- common
- include
- common
- test/perl
32 files changed
+661
-127
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8144 | 8144 |
| |
8145 | 8145 |
| |
8146 | 8146 |
| |
| 8147 | + | |
| 8148 | + | |
| 8149 | + | |
| 8150 | + | |
| 8151 | + | |
| 8152 | + | |
| 8153 | + | |
| 8154 | + | |
| 8155 | + | |
| 8156 | + | |
| 8157 | + | |
| 8158 | + | |
| 8159 | + | |
| 8160 | + | |
| 8161 | + | |
| 8162 | + | |
| 8163 | + | |
8147 | 8164 |
| |
8148 | 8165 |
| |
8149 | 8166 |
| |
|
Lines changed: 19 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
79 | 87 |
| |
80 | 88 |
| |
81 | 89 |
| |
| |||
188 | 196 |
| |
189 | 197 |
| |
190 | 198 |
| |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
191 | 210 |
| |
192 | 211 |
| |
193 | 212 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
737 | 737 |
| |
738 | 738 |
| |
739 | 739 |
| |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
740 | 746 |
| |
741 | 747 |
| |
742 | 748 |
| |
|
Lines changed: 6 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
425 | 425 |
| |
426 | 426 |
| |
427 | 427 |
| |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
428 | 434 |
| |
429 | 435 |
| |
430 | 436 |
| |
|
Lines changed: 11 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
399 | 399 |
| |
400 | 400 |
| |
401 | 401 |
| |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
402 | 413 |
| |
403 | 414 |
| |
404 | 415 |
| |
|
Lines changed: 25 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
140 |
| - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
141 | 156 |
| |
142 | 157 |
| |
143 | 158 |
| |
| |||
2194 | 2209 |
| |
2195 | 2210 |
| |
2196 | 2211 |
| |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
2197 | 2221 |
| |
2198 | 2222 |
| |
2199 | 2223 |
| |
|
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
349 | 349 |
| |
350 | 350 |
| |
351 | 351 |
| |
352 |
| - | |
353 |
| - | |
354 |
| - | |
355 |
| - | |
356 |
| - | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
357 | 356 |
| |
| 357 | + | |
| 358 | + | |
358 | 359 |
| |
| 360 | + | |
359 | 361 |
| |
360 | 362 |
| |
361 | 363 |
| |
|
Lines changed: 15 additions & 72 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
391 | 391 |
| |
392 | 392 |
| |
393 | 393 |
| |
394 |
| - | |
| 394 | + | |
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| |||
588 | 588 |
| |
589 | 589 |
| |
590 | 590 |
| |
591 |
| - | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
592 | 597 |
| |
593 | 598 |
| |
594 | 599 |
| |
| |||
877 | 882 |
| |
878 | 883 |
| |
879 | 884 |
| |
| 885 | + | |
| 886 | + | |
| 887 | + | |
880 | 888 |
| |
881 | 889 |
| |
882 | 890 |
| |
| |||
1469 | 1477 |
| |
1470 | 1478 |
| |
1471 | 1479 |
| |
1472 |
| - | |
1473 | 1480 |
| |
1474 |
| - | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1475 | 1485 |
| |
1476 | 1486 |
| |
1477 |
| - | |
| 1487 | + | |
1478 | 1488 |
| |
1479 | 1489 |
| |
1480 | 1490 |
| |
1481 |
| - | |
1482 |
| - | |
1483 |
| - | |
1484 |
| - | |
1485 |
| - | |
1486 |
| - | |
1487 |
| - | |
1488 |
| - | |
1489 |
| - | |
1490 |
| - | |
1491 |
| - | |
1492 |
| - | |
1493 |
| - | |
1494 |
| - | |
1495 |
| - | |
1496 |
| - | |
1497 |
| - | |
1498 |
| - | |
1499 |
| - | |
1500 |
| - | |
1501 |
| - | |
1502 |
| - | |
1503 |
| - | |
1504 |
| - | |
1505 |
| - | |
1506 |
| - | |
1507 |
| - | |
1508 |
| - | |
1509 |
| - | |
1510 |
| - | |
1511 |
| - | |
1512 |
| - | |
1513 |
| - | |
1514 |
| - | |
1515 |
| - | |
1516 |
| - | |
1517 |
| - | |
1518 |
| - | |
1519 |
| - | |
1520 |
| - | |
1521 |
| - | |
1522 |
| - | |
1523 |
| - | |
1524 |
| - | |
1525 |
| - | |
1526 |
| - | |
1527 |
| - | |
1528 |
| - | |
1529 |
| - | |
1530 |
| - | |
1531 |
| - | |
1532 |
| - | |
1533 |
| - | |
1534 |
| - | |
1535 |
| - | |
1536 |
| - | |
1537 |
| - | |
1538 |
| - | |
1539 |
| - | |
1540 |
| - | |
1541 |
| - | |
1542 |
| - | |
1543 |
| - | |
1544 |
| - | |
1545 |
| - | |
1546 |
| - | |
1547 |
| - | |
1548 | 1491 |
| |
1549 | 1492 |
| |
1550 | 1493 |
| |
|
Lines changed: 1 addition & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3731 | 3731 |
| |
3732 | 3732 |
| |
3733 | 3733 |
| |
3734 |
| - | |
3735 |
| - | |
| 3734 | + | |
3736 | 3735 |
| |
3737 | 3736 |
| |
3738 | 3737 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| 19 | + | |
| 20 | + | |
19 | 21 |
| |
20 | 22 |
| |
| 23 | + | |
21 | 24 |
| |
22 | 25 |
| |
23 | 26 |
| |
| |||
59 | 62 |
| |
60 | 63 |
| |
61 | 64 |
| |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
62 | 71 |
| |
63 | 72 |
| |
64 | 73 |
| |
|
0 commit comments
Comments
(0)