File tree 2 files changed +14
-4
lines changed 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,12 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
41
41
find /opt/couchdb/data -type d ! -perm 0755 -exec chmod -f 0755 ' {}' +
42
42
find /opt/couchdb/data -type f ! -perm 0644 -exec chmod -f 0644 ' {}' +
43
43
44
- find /opt/couchdb/etc -name \* .ini -exec chmod -f 664 {} \;
45
- chmod -f 775 /opt/couchdb/etc/* .d || true
44
+ # Do the same thing for configuration files and directories. Technically
45
+ # CouchDB only needs read access to the configuration files as all online
46
+ # changes will be applied to the "docker.ini" file below, but we set 644
47
+ # for the sake of consistency.
48
+ find /opt/couchdb/etc -type d ! -perm 0755 -exec chmod -f 0755 ' {}' +
49
+ find /opt/couchdb/etc -type f ! -perm 0644 -exec chmod -f 0644 ' {}' +
46
50
47
51
if [ ! -z " $NODENAME " ] && ! grep " couchdb@" /opt/couchdb/etc/vm.args; then
48
52
echo " -name couchdb@$NODENAME " >> /opt/couchdb/etc/vm.args
Original file line number Diff line number Diff line change @@ -37,8 +37,14 @@ if [ "$1" = '/opt/couchdb/bin/couchdb' ]; then
37
37
find /opt/couchdb/data -type d ! -perm 0755 -exec chmod 0755 ' {}' +
38
38
find /opt/couchdb/data -type f ! -perm 0644 -exec chmod 0644 ' {}' +
39
39
40
- find /opt/couchdb/etc -name \* .ini -exec chmod -f 664 {} \;
41
- chmod -f 775 /opt/couchdb/etc/* .d || true
40
+ # Do something similar for configuration files and directories. Technically
41
+ # CouchDB only needs read access to the configuration files as all online
42
+ # changes will be applied to the "docker.ini" file below, but we set 644
43
+ # for the sake of consistency. We also add the `-f` flag because there may
44
+ # be cases where some of the contents of etc/ are mounted read-only, and if
45
+ # those files allow couchdb to read them we don't want to crash here ...
46
+ find /opt/couchdb/etc -type d ! -perm 0755 -exec chmod -f 0755 ' {}' +
47
+ find /opt/couchdb/etc -type f ! -perm 0644 -exec chmod -f 0644 ' {}' +
42
48
43
49
if [ ! -z " $NODENAME " ] && ! grep " couchdb@" /opt/couchdb/etc/vm.args; then
44
50
echo " -name couchdb@$NODENAME " >> /opt/couchdb/etc/vm.args
You can’t perform that action at this time.
0 commit comments