Skip to content

Conversation

@brainexe
Copy link
Contributor

@brainexe brainexe commented Sep 2, 2025

In our case, we have a "grafsy" user running with umask 0022.
When starting on a fresh system or restarting the VM (which also wipes /tmp), the service created /tmp/grafsy with 755 instead of 777.
In this case I'd suggest to force create the directory with the full 777 on grafsy level already.

Reproduction steps:

$ sudo service grafsy stop && sudo rm /tmp/grafsy -rf && sudo service grafsy restart && ls -lsa /tmp/grafsy
total 4
0 drwxr-xr-t  2 grafsy grafsy    6 Sep  2 11:54 .
4 drwxrwxrwt 15 root   root   4096 Sep  2 11:54 ..

With the change in config.go, its:

$ ls -lsa /tmp/grafsy
total 4
0 drwxrwxrwt  2 grafsy grafsy    6 Sep  2 11:56 .
4 drwxrwxrwt 14 root   root   4096 Sep  2 11:58 ..
  • side fix: don't force go 1.23 toolchain

… is set)

side fix: don't force go 1.23 toolchain
config.go Outdated

if _, err := os.Stat(conf.MetricDir); os.IsNotExist(err) {
os.MkdirAll(conf.MetricDir, 0777|os.ModeSticky)
// Temporarily set umask to 0 to ensure 777 permissions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid it looks like UNIX-specific things.

We need to take care of separating them into all these files:
image

@brainexe
Copy link
Contributor Author

brainexe commented Sep 2, 2025

year, true, now doing it the more simple way (mkdir+chown)

@Felixoid
Copy link
Collaborator

Felixoid commented Sep 2, 2025

LGTM, @leoleovich?

@leoleovich
Copy link
Owner

Looks good, usually we ask to squash commits into 1 but GitHub allows to do so while merging

@leoleovich leoleovich merged commit 6bf7cb4 into leoleovich:master Sep 2, 2025
18 checks passed
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.

3 participants