Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the user to control what file mode tmp/ directories are made with #935

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

OrdiNeu
Copy link
Contributor

@OrdiNeu OrdiNeu commented Jan 20, 2025

This adds an option to the .env file, DIR_PERMISSIONS (default 775), which controls the permissions that tmp/ and its subfolders are made with. As this the read/write modes are inherited by the files created within that folder, setting this value should also affect the file modes of any files in that directory.

@OrdiNeu OrdiNeu requested a review from mshadbolt January 20, 2025 20:38
@mshadbolt
Copy link
Contributor

mshadbolt commented Jan 20, 2025

I pulled the branch and updated my .env and I get the following error when trying to build-all (after a clean-all)

(candig)  % make build-all
mkdir -m=775 -p bin
mkdir: invalid file mode: =775
make: *** [mkdir] Error 1

@mshadbolt
Copy link
Contributor

added the new variable and some other missing variables to the production example env and also added some info to the docs

@mshadbolt
Copy link
Contributor

I tried removing the = after the -m flag for the mkdir commands and that fixed the issue for me but not sure if there is a mismatch on what works on linux vs mac so I didn't push a commit for this.

@OrdiNeu
Copy link
Contributor Author

OrdiNeu commented Jan 21, 2025

I tried removing the = after the -m flag for the mkdir commands and that fixed the issue for me but not sure if there is a mismatch on what works on linux vs mac so I didn't push a commit for this.

I thought I had issues last night getting the permissions to stick with just -m but after retrying it now the argument seems to work fine.

@mshadbolt
Copy link
Contributor

Re ran with the updates, do the below permissions seem correct?

CanDIGv2 % stat -f "%p  %N" tmp/* 
100644  tmp/containers.txt
40755  tmp/data
100644  tmp/error.txt
40755  tmp/keycloak
40777  tmp/logs
40755  tmp/postgres
100644  tmp/progress.txt
40755  tmp/redis
40755  tmp/secrets
100644  tmp/site-admin-refresh-token
40755  tmp/tyk
40755  tmp/vault

@OrdiNeu
Copy link
Contributor Author

OrdiNeu commented Jan 23, 2025

Re ran with the updates, do the below permissions seem correct?

CanDIGv2 % stat -f "%p  %N" tmp/* 
100644  tmp/containers.txt
40755  tmp/data
100644  tmp/error.txt
40755  tmp/keycloak
40777  tmp/logs
40755  tmp/postgres
100644  tmp/progress.txt
40755  tmp/redis
40755  tmp/secrets
100644  tmp/site-admin-refresh-token
40755  tmp/tyk
40755  tmp/vault

Come to think of it, the files should be built with similar permissions... one moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants