Skip to content

Feat: Automatic Setting of Permissions in the Data Directory #71

@sbaerlocher

Description

@sbaerlocher

Description

I propose implementing a functionality in dde that automatically checks and sets the permissions in the DATA_DIR or DDE_DATA_DIR before the application starts, using chown based on the environment variables DDE_UID and DDE_GID. This aims to improve user experience and prevent issues with access rights.

Proposed Solution

Implementation of a Bash function to be executed as part of the startup process:

function set_correct_permissions() {
    if [ -d "$DDE_DATA_DIR" ]; then
        echo "Setting correct ownership for the directory $DDE_DATA_DIR to UID: $DDE_UID and GID: $DDE_GID"
        chown -R "$DDE_UID":"$DDE_GID" "$DDE_DATA_DIR"
    else
        echo "Directory $DDE_DATA_DIR does not exist."
    fi
}

Expected Benefit

This adjustment would simplify handling for the user and ensure that permission problems are avoided.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions