How to run occ on QNAP?

Hi Folks,

I have a problem to reset my admin password.
I'm running owncloud on a QNAP NAS. Due to some hardware issues I had to rebuild the raid.
I did do a backup before, or at least I thought I did,
After the rebuild I restorede the backup.
As a result I can logon to owncloud as a "regular" user. But I cannot login as admin anymore. Hence, I have to reset the admin password.
I cannot use the GUI because no email address is configured. As a result, owncloud cannot send a mail.

It seems, I have to run php occ user:resetpassword admin

Now the problem comes in:
The command has to be run as user 'httpdusr'. Unfortunately there is no su or sudo in QNAP.
Does anybody here has an idea how to run that command on QNAP?

Hardware is QNAP TS-559 Pro II, Firmware is 4.2.2, Owncloud is V8.0.4

I don't know the QNAP environment and where the installation can be found (did you try the Linux search tools such as find or locate?). If you have access to the database, you can try to add an email address for this user manually.

Also make sure that your libxml is at least version 2.7.0:

I reopen this topic.

I need to runt the command to scan all my docs since i put some files without WEBDAV or Owncloud Clients. and manual copy/resync is a criminal process.

Syntax is not clear. I can’t run occ commands . I have libxml v 2.9.2.
Install (and occ file ) is in /share/MD0_DATA/.qpkg/owncloud/owncloud
I use standard qnap Qhttpd
User which has ownership is httpdusr.

I tried everything. I am not really very specialized.

Thanks

@Alex_Daniel_Milea

Hey,

i’m not sure if you can expect that much help with such limited info you have provided. :confused: Unfortunately short sentences like “syntax is not clear” and “i tried everything” is nothing what others can base their answers on.

I would suggest that you’re trying to provide all steps you did and the issues you have faced while trying to run the occ command. Maybe then some one can give you some notes / help on your issue.

As i side note:

I had read in the past that you shouldn’t use the scan command on normal operation of ownCloud.

Ok then.
I have OC 9 on a QNAP 4.2 Environment with manual libxml2.9.2 (Webdav up and running on my cloud) I use WINSCP as my SFTP browser.
I have recently copied some files directly via SMB protocol onto my server therefore the Webdav does not sees them (implicitly the OC interface)
I want to tell occ to scan all of my files and reupdate it’s index with the following command

sudo -u httpdusr php occ files:scan --all

and i receive

-sh: line 7: sudo: command not found

httpdusr indeed has access to the occ php file = rw

I just can’t run the command while having the libxml 2.9.2 (which was a solution to this topic).
If no scan command, how can i rebuild my index?

Tnx a lot!

Hey,

it seems your system doesn’t provide this “sudo” command you’re trying to run which you can see on your own in the “command not found” message. You probably need to find a way to run this commands without sudo but with the correct httpdusr on your system.

I would suggest, looking for qnap topics in qnap forums. You might have better luck.

1 Like