hotfix: roll back and add back permissions a+rwx to app-data folder
This commit is contained in:
parent
4917f2da75
commit
644dfbc7a6
3 changed files with 12 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "runtipi",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "A homeserver for everyone",
|
||||
"scripts": {
|
||||
"knip": "knip",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -86,6 +86,8 @@ export class SystemExecutors {
|
|||
}
|
||||
}),
|
||||
);
|
||||
|
||||
await execAsync(`sudo chmod -R a+rwx ${path.join(rootFolderHost, 'app-data')}`);
|
||||
};
|
||||
|
||||
public systemInfo = async () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue