-
-
Notifications
You must be signed in to change notification settings - Fork 807
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
Assets directory not writable #459
Comments
Hey 👋 set INIT_ASSETS to 0 will prevent homer to try to write into the directory, but you will have to configure homer entirely from scratch. The defaults assets provides a base config you can easily edit to your needs. |
I'm having this same issue now after updating my server. My config looks similar as above and the GID and UID in the docker-compose match the owner of the assets directory. I have other containers running as expected on the same server and Homer seems to be the only one that broke during the update. Edit: Nevermind, I went to the other thread and used solutions posted there. Its working again. |
@bastienwirtz you mean , I should delete images , container , directory and do everything by setting env variable ? Thank you for the response. |
I had the same problem using 'user: 1000:1000', I tried several different directories but none worked. I changed it to 'user: 0:0' and this worked for me. I am far from a Linux expert though, so this may not be recommended. |
that helped me a lot, thanks mate |
@tropics1999 @e1ke
I mean if you skip asset install you will have to create a @WarmEthernet That's weird, could you run those commands and share the result ? # You might need to replace "homer" by your container name if different
docker inspect homer | grep User
docker inspect homer | grep assets
# Show ownership and permissions on your mounted assets dir
ls -la <path/to/asset/dir> That would help me understand. Thanks you 🙏 |
@VajraCool @tropics1999 @e1ke you can also run the commands I suggested to WarmEthernet and share the result. It would help debug. |
does this help? |
@e1ke Could you also share the docker-compose configuration or the command you use to run docker ? Thanks! |
|
I have the same problem with the latest image in my raspberry pi but I am new to all this. could you please elaborate on what you did please? |
I reverted back to b4bz/homer:22.02.2-arm64v8 and the original configs is working fine now. I believe "something" is broken in the latest image. |
It appears there are two issues at play here. I've just stumbled into this after updating to the latest image.
The entrypoint is looking for the legacy
Under normal circumstances Disabling the default configuration creation via |
This solved it for me. @bastienwirtz I probably haven’t done a |
I found this issue because loading Homer in the browser shows an alert box with this text:
I double checked that the assets directory's owner and group matched the It seems Homer is not respecting these environment variables. I had to add |
Also have this issue when upgrading to the latest image.
But I still get :
Even when setting proper file permissions :
It’s very weird. After investigating more I can see that root is correctly mapped in the container but lighttpd is still under lighttpd :
It will obviously not even be able to access files the entrypoint settled as root when starting. So I try to force all users to root by setting the namespace to the host root :
Unfortunately it still can’t access files on the host. it is not a SELinux issue as I tried while disabling it. |
@jimmycuadra This is the normal behavior. env vars are used during the image build only (that why these variable are not listed in the documentation), the @mguaylam Indeed it's related to #421. Please do not use |
Hey @ALL ! I will write a detailed section about permissions management in the documentation, but the tl;dr is:
And you should be fine. |
Ok it indeed does not work with root anymore. Changing it to another user did work. Thank you. |
The behavior has changed recently and never been properly documented. I just added some documentation about that in the README and the troubleshooting page. Hope it helps. I think we covered the cause, debugging and resolution of the issue in this thread, so I'm closing the issue. Thank you all! |
@bastienwirtz |
In my case the solution was to create the /home/assets directory via SSH first (rather than via docker-compose) as it seems it was being created with root credentials rather than user ones |
Hello! I still cannot get it to run. I am using mac os x and a docker yaml. drwxr-xr-x 2 1000 1000 64 22 Jul 14:12 assets\ thanks for you help! error: EDIT: Running it with 0:0 user works - i read it's not recommendet but i cannot find another way running mac os x |
i had the same issue which (in my case) was caused by an outdated version of with an update to the latest version (2.5.4.1) i was able to fix the issue without manually changing permissions on the directories
|
If you write it like this, it works fine. you just need to add -u:1000:1000 |
Thank you for doing this as the readme doesn't mention anything about it. I had the same problem. I initially suspected something was up as the permissions issues vanished only after I used a uid and gid of 1000 in my docker run command. |
Out of curiosity, I run this docker container inside an lxc container. If I run this as root - since this container really only has access to another container - would this be ok? |
Can you fix is , there is still and issue.
Other docker compose create volumes with 1000 user but yours create as root, you have something wrong in your image. |
@asyba You nailed it... we shouldn't have to fix the permissions when running this image.... never have, and I'm not starting today. I was hoping to give homer a spin, but simply won't today based on principle. Do I know how to change permissions on the assets folder? Sure... have I ever had to do that for a container that creates its own folders before? No. I'll check back again some day down the road. |
100% Homer image issue, not my permissions. I run the same CLI template for all other images with no problems, but Homer likes the Root.
Results in
chown kff:kff homer |
Not sure if is relevant or not, but I was having the same issue. My host is a Synology NAS. I downloaded the image from hub.docker.com, but I couldn't mount the volume. I run it without the volume mount to be able to run it, on the running container on /etc/passwd for user I then set the permission on the folder to be mounted on the host to 1000:65533, rerun the container with the volume mount, and it ran successfully. Files created in the folder use 1000:1000. Cheers |
@Gugatec this worked for me as well. Running on my Synology NAS with Container Manager. The NAS folder that is being mapped to the container needs updated permissions. Create the folder and then either SSH or run a Scheduled Task to update the owner of the folder you've created in your NAS. We're using the
for example, for me:
Then add that path as a linked folder on the container's Volume Settings, linking it to the assets folder:
and I set my
|
This is still broken but I can confirm that the tricks in this thread work - change your |
@nmhare On my synology, it only worked with pid/gid 1000:65533 (these are the ids used inside the container) and not my synology user pid:gid. |
I am facing the same issues on my Synology. I have the docker-compose as follows:
I have to chmod 777 to homer/assets folder. That solve the assets not writable error. |
Thanks for all the post here. I solve the write issue with the following command. sudo chown 1000:1000 *for future reference |
I'm not reading all of this thread but i had this issue because i made the docker folder in the idk what to call it root directory? where /etc is stored etc the way i solved it was juts sudo chown -R yes its called the root directory i jus googled |
I am facing the issue as mentioned below. I have tried removing the container and even removed image as well and tried to run
here is my
docker-compose
fileerror I see
I see the permissions are there to write
I am not sure what exactly this gonna do skip default assets install by setting the INIT_ASSETS env var to 0 ?
is there something I am missing ?
Note - created new issue as this issue is closed.
The text was updated successfully, but these errors were encountered: