hotfix: roll back and add back permissions a+rwx to app-data folder

This commit is contained in:
Nicolas Meienberger 2023-08-30 08:42:48 +02:00 committed by Nicolas Meienberger
parent 4917f2da75
commit 644dfbc7a6
3 changed files with 12 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"name": "runtipi",
"version": "1.6.0",
"version": "1.6.1",
"description": "A homeserver for everyone",
"scripts": {
"knip": "knip",

View file

@ -1,11 +1,15 @@
import fs from 'fs';
import path from 'path';
import { exec } from 'child_process';
import { promisify } from 'util';
import { getEnv } from '@/utils/environment/environment';
import { pathExists } from '@/utils/fs-helpers';
import { compose } from '@/utils/docker-helpers';
import { copyDataDir, generateEnvFile } from './app.helpers';
import { fileLogger } from '@/utils/logger/file-logger';
const execAsync = promisify(exec);
export class AppExecutors {
private readonly logger;
@ -138,6 +142,8 @@ export class AppExecutors {
public startApp = async (appId: string, config: Record<string, unknown>) => {
try {
const { appDataDirPath } = this.getAppPaths(appId);
this.logger.info(`Starting app ${appId}`);
this.logger.info(`Regenerating app.env file for app ${appId}`);
@ -146,6 +152,9 @@ export class AppExecutors {
await compose(appId, 'up --detach --force-recreate --remove-orphans');
this.logger.info(`App ${appId} started`);
await execAsync(`chmod -R a+rwx ${path.join(appDataDirPath)}`).catch(() => {});
return { success: true, message: `App ${appId} started successfully` };
} catch (err) {
return this.handleAppError(err);

View file

@ -86,6 +86,8 @@ export class SystemExecutors {
}
}),
);
await execAsync(`sudo chmod -R a+rwx ${path.join(rootFolderHost, 'app-data')}`);
};
public systemInfo = async () => {