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

Problem with access rights on data subdirectory on Windows #4641

Open
bjornea opened this Issue Sep 20, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@bjornea
Copy link

bjornea commented Sep 20, 2018

I installed version 2.4.1 for Windows and tried to start the server. It fails with the following error msg:

C:\Programs\prometheus-2.4.1.windows-amd64>prometheus.exe --config.file=prometheus.yml
....
level=error ts=2018-09-20T08:55:41.614057Z caller=main.go:617 err="opening storage failed: list block dirs in "data/": open data/: Access is denied."

Access rights for data directory:
PS C:\Programs\prometheus-2.4.1.windows-amd64> Get-Acl data | fl

Path : Microsoft.PowerShell.Core\FileSystem::C:\Programs\prometheus-2.4.1.windows-amd64\data
Owner : CORP\bal
Group : CORP\Domain Users
Access : NULL SID Deny ReadExtendedAttributes, WriteExtendedAttributes, ExecuteFile, DeleteSubdirectoriesAndFiles, ReadPermissions
BUILTIN\Administrators Allow DeleteSubdirectoriesAndFiles, Write, ReadAndExecute, Synchronize
S-1-99-0 Allow DeleteSubdirectoriesAndFiles, Write, ReadAndExecute, Synchronize
NT AUTHORITY\SYSTEM Allow DeleteSubdirectoriesAndFiles, Write, ReadAndExecute, Synchronize
Audit :
Sddl : O:S-1-5-21-1043938702-3518237282-2318151422-14557G:DUD:(D;OICIID;SWRPWPDTRC;;;S-1-0-0)(A;OICIID;0x1201ff;;;BA)(A;OICIID;0x1201ff;;;S-1-99-0)(A;OICIID;0x1201ff;;;SY)

Listed from MobaXTerm before start:
drwxr-x--- 1 bal UsersGrp 0 Sep 20 10:51 data

after start:
d---rwx--- 1 bal UsersGrp 0 Sep 20 10:46 data

It looks as the server modifies the access rights, possible to safeguard the data directory, but the access right ends up 070 and not 700?

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Sep 20, 2018

Hi, I'm fixing a bunch of things with 2.4.x on Windows, but this doesn't look like any of them. I'm not a Windows user so this is a little alien to me.

Having said that, could you try 2.3.2 and report if the same issue exists there?

@bjornea

This comment has been minimized.

Copy link
Author

bjornea commented Sep 20, 2018

Yes, I can try 2.3.2. I tried 2.3.0 yesterday and it had the same issue.

@bjornea

This comment has been minimized.

Copy link
Author

bjornea commented Sep 20, 2018

C:\Programs\prometheus-2.3.2.windows-amd64>prometheus.exe --config.file=prometheus.yml
level=info ts=2018-09-20T10:27:02.3933269Z caller=main.go:222 msg="Starting Prometheus" version="(version=2.3.2, branch=HEAD, revision=71af5e29e815795e9dd14742ee7725682fa14b7b)"
...
level=error ts=2018-09-20T10:27:02.4517488Z caller=main.go:596 err="Opening storage failed open data/: Access is denied."

It looks the same.

@bjornea

This comment has been minimized.

Copy link
Author

bjornea commented Sep 20, 2018

I got it up and running with this fix.

$ cd prometheus-2.3.2.windows-amd64
$ mv data data1
$ mkdir data
$ chmod 777 data

@gouthamve

This comment has been minimized.

Copy link
Member

gouthamve commented Sep 27, 2018

Hi, this should be fixed in 2.4.2 could you try and check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.