Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 915770

Summary: www-apps/nextcloud: occ lacks executable bit
Product: Gentoo Linux Reporter: Dennis Lamm <expeditioneer>
Component: Current packagesAssignee: Bernard Cafarelli <voyageur>
Status: CONFIRMED ---    
Severity: normal CC: bertrand, flow, gentoo, voyageur
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Dennis Lamm gentoo-dev 2023-10-14 17:08:46 UTC
The 'occ' command line tool lacks execution bit-

The command can be found here /usr/share/webapps/nextcloud/%version%/htdocs/occ.

To discussion:
Maybe a symlink (with version?) can be provided in /usr/bin 

Reproducible: Always

Actual Results:  
occ command can not be executed

Expected Results:  
occ command can be executed
Comment 1 Florian Schmaus gentoo-dev 2024-08-22 17:21:02 UTC
I am skeptical that making the occ script executable is the right thing to do, as it should be often run as the user under which nextcloud runs, for example 'apache' or 'nginx'. Otherwise you may end up with the wrong file permissions as a result of occ operating on the filesystem.

Furthermore, making it a symlink in /usr/bin is not feasible as long as nextcloud is slotted. And this alone is no reason to unslot nextcloud.

@voyageur what is your stance on this?
Comment 2 Bernard Cafarelli gentoo-dev 2024-08-24 08:29:55 UTC
Indeed, the script should be run as correct user (system dependant), also global symlinks would also be complicated to handle, in case you have multiple versions installed (for testing etc).

And for the script itself, IIRC I just left the executable bit out as upstream does not set it, also recommending in their doc to use "sudo -u $user $php_version $path_to_occ":
https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#http-user-label