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

permission denied #92

Closed
xiejiulong opened this issue Jun 7, 2023 · 5 comments
Closed

permission denied #92

xiejiulong opened this issue Jun 7, 2023 · 5 comments

Comments

@xiejiulong
Copy link

xiejiulong commented Jun 7, 2023

I run gossa in docker, and the run cmd is :
sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 pldubouilh/gossa
but when i upload a file,for example css file, the docker log show me:
error [upload %2Fstyle.css] open /shared/style.css: permission denied.

i tried other kind file , same err, why?

@xiejiulong
Copy link
Author

image

@pldubouilh
Copy link
Owner

hey - thanks for the report !
So this happens when ~/LocalDirToShare is not created before calling sudo docker .... Then Docker creates the folder as root, making gossa unable to access it. Just rm -rf ~/LocalDirToShare and then mkdir ~/LocalDirToShare before you run the docker invoke. I'll amend the main docs to reflect this 👍

pldubouilh added a commit that referenced this issue Jun 7, 2023
@xiejiulong
Copy link
Author

hey - thanks for the report ! So this happens when ~/LocalDirToShare is not created before calling sudo docker .... Then Docker creates the folder as root, making gossa unable to access it. Just rm -rf ~/LocalDirToShare and then mkdir ~/LocalDirToShare before you run the docker invoke. I'll amend the main docs to reflect this 👍

thanks for the replay.
but it does't work for me.
I exec rm -rf ~/LocalDirToShare and then mkdir ~/LocalDirToShare, and then clear all the docker containers.
at last exec:
sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 pldubouilh/gossa
the docker logs still show me:
error [upload %2FOffice2Pdf.rar] open /shared/Office2Pdf.rar: permission denied
I don't know why.

@pldubouilh
Copy link
Owner

hm odd, this is working just fine on my setup...
maybe ls -lha ~/LocalDirToShare see who's the owner and what are the perms ?

@xiejiulong
Copy link
Author

I solved the problem:
after exec
sudo docker run -v ~/LocalDirToShare:/shared -p 8001:8001 pldubouilh/gossa
then, go to the container exec:
chmod 777 /root/shared
then exit the container.
now, I can upload any file to gossa.
thanks a lot.

But unfortunately, I don't know why the docker or gossa has no permission to access the dir named "~/LocalDirToShare" in host machine map to "/root/share" in the container

pldubouilh added a commit that referenced this issue Jul 8, 2023
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

No branches or pull requests

2 participants