Wonderfall / dockerfiles

Discontinued. Fork at your will.
Creative Commons Zero v1.0 Universal
391 stars 170 forks source link

Good way to run OCC commands? #234

Closed benyanke closed 7 years ago

benyanke commented 7 years ago

Is there a good way to run OCC commands? I had to tweak some settings using OCC, and the only way I could do it was by creating an "apache" user with a 991 UID, because OCC checks the ownership to ensure you're running as the web user. After manually creating that user by editing /etc/passwd, /etc/shadow, etc, I could then su apache and run occ.

If this isn't currently a solved problem, I'd propose adding a user automatically (perhaps named php or webserver) in the container with the same UID as the files are owned by, to ensure users can easily run occ commands as needed.

hoellen commented 7 years ago

There is a little script under /usr/local/bin which runs the occ command with the right UID. You can call it with docker exec -ti nextcloud_container_name occ or if you have an opened shell for the nextcloud container just use occ

benyanke commented 7 years ago

Excellent, thank you. I've added a simple bash occ script in my host's $PATH so can call occ [cmd] directly from the host.