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

app/generateAllureReport.sh: line 56: /app/allure-docker-api/static/projects/default/results/executor.json: Permission denied #108

Closed
godomainz opened this issue Jul 24, 2020 · 6 comments
Labels
answered Question answered question Further information is requested

Comments

@godomainz
Copy link

godomainz commented Jul 24, 2020

Latest docker image gives below errors
allure_1 | /app/generateAllureReport.sh: line 56: /app/allure-docker-api/static/projects/default/results/executor.json: Permission denied
cp: cannot create directory '/app/allure-docker-api/static/projects/default/results/history': Permission denied

Its NOT reloading when new results generating.I have to restart the service to see new results.
I'm using Ubuntu 18.04

below is my docker-compose.yml
version: '3'
services:
allure:
image: "frankescobar/allure-docker-service"
environment:
CHECK_RESULTS_EVERY_SECONDS: 1
KEEP_HISTORY: "TRUE"
ports:
- "4040:4040"
- "5050:5050"
volumes:
- ./allure-results:/app/allure-results

@fescobar
Copy link
Owner

@godomainz
It's related to your directory permissions, you shouldn't use root user. Read this please:
https://github.com/fescobar/allure-docker-service#override-user-container
Also, there are a lot of tickets asking that
#97
#69
#65

Also, don't use the port 4040 anymore, it was deprecated
https://github.com/fescobar/allure-docker-service#port-4040-deprecated

@noamgreen
Copy link

HI
in kube add this to the

spec:
template:
............ some
metadata:
............ some
spec:
securityContext:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000

when you use PVC you will get default kube permissions as " root "
add "fsGroup: 1000"

Thansk

@peter-miroshnikov
Copy link

I cant seem to fix this issue when i run this in k8s.
Even if i add a fsGroup:1000 to the container specs i still get access denied when i try to create new project.

@fescobar fescobar mentioned this issue Feb 21, 2022
@thodquach
Copy link

thodquach commented Apr 25, 2022

I cant seem to fix this issue when i run this in k8s. Even if i add a fsGroup:1000 to the container specs i still get access denied when i try to create new project.

I have same problem too when try to deploy allure on k8s

Cannot read properties of undefined (reading 'security_enabled')

@VovaPavlyuk
Copy link

You can set the deployment to run as root (which is not very good), but this will solve this problem

          securityContext:
            runAsUser: 0
            runAsGroup: 0

@zlyuk13
Copy link

zlyuk13 commented Nov 6, 2023

I have fixed the perimission issue by changing locally create projects directory permission to 777 i.e.

chmod 777 projects/

For some reason if this is not set even passing current user id and group does not allow to create subdirectories or/and throws permission error when running as advised:
MY_USER=$(id -u):$(id -g) docker-compose up allure
Aparently we need to be able to execute contents of the projects directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered Question answered question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants