sergeycherepanov / homebrew-docker-virtualbox

Docker workaround for Ryzentosh (AMD based Hackintosh)
208 stars 20 forks source link

ryzentosh catalina permission : operation not permitted #6

Closed betosiahaan closed 3 years ago

betosiahaan commented 4 years ago

what I want to do : give permission to my storage laravel app

what command i do : docker exec -it myapp-php-fpm chown -R www-data:www-data /application/myapp/app/storage

error Message : chown: changing ownership of '/application/myapp/app/storage': Operation not permitted

already done this step

sudo tee /etc/sudoers.d/docker-machine-nfs  <<SUDOERS
%staff ALL=(ALL) NOPASSWD: /sbin/nfsd
%staff ALL=(ALL) NOPASSWD: /bin/cp /etc/nfs.conf /etc/nfs.conf.bak
%staff ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/exports
%staff ALL=(ALL) NOPASSWD: /usr/bin/tee /etc/nfs.conf
%staff ALL=(ALL) NOPASSWD: $(brew --prefix docker-virtualbox)/bin/gobetween
SUDOERS
sergeycherepanov commented 4 years ago

hi @betosiahaan If you change the owner to 33 (www-data), you will not be able to edit this files from your mac. Because mac user id usually begins from 500.

You need to look to you container and find the way to change www-data id to proper. Usually in public images it's possible to configure by environment variables.

Anyway, the issues not related to the docker environments setup.

kprinssu commented 4 years ago

I am not sure if it's in the same vein of issues, but I had issue with the NFS mounts not having permissions to access ~/Documents and ~/Downloads on Catalina.

The quickest fix was opening System Preferences -> Security & Privacy -> Privacy -> Full Disk Access and adding /sbin/nfsd to the list by clicking the + button.

lucaspdude commented 4 years ago

Solution by @kprinssu worked for me. Thansk!

betosiahaan commented 4 years ago

@kprinssu it works to run the container, but still there is problem, for example in my laravel app, its still cannot run because user in container still cannot create cache (419 error)

lucaspdude commented 4 years ago

@betosiahaan try using https://github.com/adlogix/docker-machine-nfs

This issue helped figure out my problem on mysql: https://github.com/adlogix/docker-machine-nfs/issues/32

sergeycherepanov commented 4 years ago

Hi, @lucaspdude it is already used by my script, but need to try with proposed options