Closed benyanke closed 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
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.
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
orwebserver
) in the container with the same UID as the files are owned by, to ensure users can easily run occ commands as needed.