diff --git a/src/mounts.js b/src/mounts.js index 114856a82..30abd1f51 100644 --- a/src/mounts.js +++ b/src/mounts.js @@ -66,7 +66,7 @@ function renderMountFile(volume) { case 'cifs': type = 'cifs'; what = `//${mountOptions.host}` + path.join('/', mountOptions.remoteDir); - options = `username=${mountOptions.username},password=${mountOptions.password},rw,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=yellowtent,gid=yellowtent`; + options = `username=${mountOptions.username},password=${mountOptions.password},rw,iocharset=utf8,file_mode=0666,dir_mode=0777,uid=yellowtent,gid=yellowtent`; break; case 'nfs': type = 'nfs'; @@ -126,7 +126,7 @@ async function getStatus(mountType, hostPath) { if (output) { const rlines = output.split('\n').reverse(); - const idx = rlines.findIndex(l => /^mount./.test(l) || l.includes('failed') || l.includes('error')); + const idx = rlines.findIndex(l => /^mount./.test(l) || l.includes('failed') || l.includes('error') || l.includes('reset')); if (idx !== -1) message = rlines[idx]; } if (!message) message = `Could not determine failure reason. ${safe.error ? safe.error.message : ''}`; diff --git a/src/scripts/addmount.sh b/src/scripts/addmount.sh index 6b75c7d2d..1eb0cf7d7 100755 --- a/src/scripts/addmount.sh +++ b/src/scripts/addmount.sh @@ -34,5 +34,6 @@ systemctl daemon-reload # systemd can automatically create the "where" dir but the backup logic relies on permissions mkdir -p "${where}" chown yellowtent:yellowtent "${where}" || true # this can fail with nfs+root_squash +chmod 777 "${where}" # this allows all users to read and write systemctl enable --no-block --now "${mount_filename}" || true