fescobar/allure-docker-service

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

godomainz opened this issue · 6 comments

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

@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

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

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 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')

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

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.