File tree 2 files changed +12
-8
lines changed 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -37,12 +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
- # Do the same thing for configuration files and directories. Technically
40
+ # Do something similar for configuration files and directories. Technically
41
41
# CouchDB only needs read access to the configuration files as all online
42
42
# changes will be applied to the "docker.ini" file below, but we set 644
43
- # for the sake of consistency
44
- find /opt/couchdb/etc -type d ! -perm 0755 -exec chmod 0755 ' {}' +
45
- find /opt/couchdb/etc -type f ! -perm 0644 -exec chmod 0644 ' {}' +
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 ' {}' +
46
48
47
49
if [ ! -z " $NODENAME " ] && ! grep " couchdb@" /opt/couchdb/etc/vm.args; then
48
50
echo " -name couchdb@$NODENAME " >> /opt/couchdb/etc/vm.args
Original file line number Diff line number Diff line change @@ -37,12 +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
- # Do the same thing for configuration files and directories. Technically
40
+ # Do something similar for configuration files and directories. Technically
41
41
# CouchDB only needs read access to the configuration files as all online
42
42
# changes will be applied to the "docker.ini" file below, but we set 644
43
- # for the sake of consistency
44
- find /opt/couchdb/etc -type d ! -perm 0755 -exec chmod 0755 ' {}' +
45
- find /opt/couchdb/etc -type f ! -perm 0644 -exec chmod 0644 ' {}' +
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 ' {}' +
46
48
47
49
if [ ! -z " $NODENAME " ] && ! grep " couchdb@" /opt/couchdb/etc/vm.args; then
48
50
echo " -name couchdb@$NODENAME " >> /opt/couchdb/etc/vm.args
You can’t perform that action at this time.
0 commit comments