Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3c0064e0b4 | |||
| c039fdecb9 | |||
| dac86d6856 | |||
| 86ca9ae9ce |
@@ -2298,3 +2298,16 @@
|
||||
[6.3.4]
|
||||
* Fix issue where old nginx configs where not removed before upgrade
|
||||
|
||||
[6.3.5]
|
||||
* filemanager: reset selection if directory has changed
|
||||
* branding: fix error highlight with empty cloudron name
|
||||
* better text instead of "Cloudron in the wild"
|
||||
* Make sso login hint translatable
|
||||
* Give unread notifications a small left border
|
||||
* Fix issue where clicking update indicator opened app in new tab
|
||||
* Ensure notifications are only fetched and shown for at least admins
|
||||
* setupaccount: Show input field errors below input field
|
||||
* Set focus automatically for new alias or redirect
|
||||
* eventlog: fix issue where old events are not periodically removed
|
||||
* ssfs: fix chown
|
||||
|
||||
|
||||
+1
-1
@@ -101,7 +101,7 @@ function startJobs(callback) {
|
||||
|
||||
gJobs.cleanupEventlog = new CronJob({
|
||||
cronTime: '00 */30 * * * *', // every 30 minutes
|
||||
onTick: eventlog.cleanup.bind(null, new Date(Date.now() - 60 * 60 * 24 * 10 * 1000)), // 10 days ago
|
||||
onTick: eventlog.cleanup.bind(null, { creationTime: new Date(Date.now() - 60 * 60 * 24 * 10 * 1000) }), // 10 days ago
|
||||
start: true
|
||||
});
|
||||
|
||||
|
||||
@@ -91,6 +91,23 @@ function checkPreconditions(apiConfig, dataLayout, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function hasChownSupportSync(apiConfig) {
|
||||
switch (apiConfig.provider) {
|
||||
case PROVIDER_NFS:
|
||||
case PROVIDER_EXT4:
|
||||
case PROVIDER_FILESYSTEM:
|
||||
return true;
|
||||
case PROVIDER_SSHFS:
|
||||
// sshfs can be mounted as root or normal user. when mounted as root, we have to chown since we remove backups as the yellowtent user
|
||||
// when mounted as non-root user, files are created as yellowtent user but they are still owned by the non-root user (thus del also works)
|
||||
return apiConfig.mountOptions.user === 'root';
|
||||
case PROVIDER_CIFS:
|
||||
return true;
|
||||
case PROVIDER_MOUNTPOINT:
|
||||
return apiConfig.chown;
|
||||
}
|
||||
}
|
||||
|
||||
function upload(apiConfig, backupFilePath, sourceStream, callback) {
|
||||
assert.strictEqual(typeof apiConfig, 'object');
|
||||
assert.strictEqual(typeof backupFilePath, 'string');
|
||||
@@ -117,7 +134,7 @@ function upload(apiConfig, backupFilePath, sourceStream, callback) {
|
||||
fileStream.on('finish', function () {
|
||||
const backupUid = parseInt(process.env.SUDO_UID, 10) || process.getuid(); // in test, upload() may or may not be called via sudo script
|
||||
|
||||
if ((apiConfig.provider !== PROVIDER_MOUNTPOINT && apiConfig.provider !== PROVIDER_CIFS) || apiConfig.chown) {
|
||||
if (hasChownSupportSync(apiConfig)) {
|
||||
if (!safe.fs.chownSync(backupFilePath, backupUid, backupUid)) return callback(new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to chown:' + safe.error.message));
|
||||
if (!safe.fs.chownSync(path.dirname(backupFilePath), backupUid, backupUid)) return callback(new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to chown:' + safe.error.message));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user