john-shine / mega.syno

Make possible to use mega.nz`s megasync on Synology with Docker
GNU General Public License v3.0
50 stars 11 forks source link

folder permission inside the container #6

Closed mmBesar closed 4 years ago

mmBesar commented 5 years ago

I did mount a custom folder for downloads, but I don't have the permission to access it inside the container.

john-shine commented 4 years ago

@mmBesar Make sure you have mount it as permission rw in container. If has already set to rw, then run: docker ps to get ${container_id}, then run: docker exec -it ${container_id} /bin/bash to enter into container bash, run: sudo chmod -R 777 ${custom_folder_path} then type: exit to exit out of container, the folder should be OK to access it inside the container.

mmBesar commented 4 years ago

@john-shine It did work with a problem, I have no access to that folder outside of the container without a root permissions! Is there a way you could update the image to set a user id, like @linuxserver or @jlesage Thank you, your work is very much appreciated

john-shine commented 4 years ago

In theory, it can solve in your way. I will try it later.

mmBesar commented 4 years ago

@john-shine It would be great, thanks.

john-shine commented 4 years ago

@mmBesar Things done, and it's better to use it with synology package in release page.

john-shine commented 4 years ago

Image has updated, event with OpenMediaVault , it should be ok. Bind inside folder /home/mega/MEGA and port 6080, and visit ${server_ip}:${bind_port} will show noVNC interface.

mmBesar commented 4 years ago

Yes! its working fine under OpenMediaVault, nice interface, I do not have to fix permissions inside the container to access mounted folders. Thank You.

One Issue, still only root can access the mounted folder. Hopefully next update will give me a way to specify a user and group IDs.

john-shine commented 4 years ago

It was a pleasure. The permission that container process running depends on the UID and GID of mounted folder on host machine. If U wanna access folder with specify user instead of root, U should create host folder with the specify user permission of owner.