[Support] dyonr - owncloud-client


Recommended Posts

Welcome to the third Docker Container that I've ever created. owncloud-client. A Docker to synchronize with other ownCloud like environments, a project forked from the GitHub user toughIQ and altered to my wishes, with Unraid in mind.

I couldn't find something that did this, thus I made it myself.

 

Overview:

This Docker runs an owncloudcmd instance that connects to an ownCloud-like environment and authorises using netrc

The reason I created this is because I wanted to sync Trans IP's STACK to my Unraid server. That product is based on Nextcloud/ownCloud. This Docker should therefore work with any of those environments. This Docker can also be used to sync with a Nextcloud server that a friend hosts for example.

 

Base: Debian 10

Automated Build: No

Application: https://github.com/owncloud/client

Docker Hub: https://hub.docker.com/r/dyonr/owncloud-client/

GitHub: https://github.com/DyonR/docker-owncloud-client

Edited by Nord
Link to comment
  • 8 months later...

My nextcloud server is running at https://nd.nl.tab.digital/ and has the following WebDAV address: remote.php/dav/files/[email protected]/

So I set "OC_WEBDAV" to "remote.php/dav/files/[email protected]/" and I get the following errors in the logs: 

03-28 19:08:11:406 [ info sync.discovery ]: STARTING "" OCC::ProcessDirectoryJob::NormalQuery "" OCC::ProcessDirectoryJob::NormalQuery
03-28 19:08:11:407 [ info sync.accessmanager ]: 6 "PROPFIND" "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/" has X-Request-ID "af56746b-456d-40ef-a2e5-37c7404e5949"
03-28 19:08:11:407 [ info sync.networkjob ]: OCC::LsColJob created for "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/" + "/" "OCC::DiscoverySingleDirectoryJob"
03-28 19:08:12:064 [ warning sync.networkjob ]: QNetworkReply::ContentOperationNotPermittedError "Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"" QVariant(int, 405)

03-28 19:08:12:065 [ info sync.networkjob.lscol ]: LSCOL of QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/") FINISHED WITH STATUS "ContentOperationNotPermittedError Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\""
03-28 19:08:12:065 [ warning sync.discovery ]: LSCOL job error "Error transferring https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/ - server replied: Method Not Allowed" 405 QNetworkReply::ContentOperationNotPermittedError

 

They clearly have the wrong address "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"

 

Also, a strange error:

"03-28 19:08:11:130 [ info sync.networkjob ]: Redirecting "GET" QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/ocs/v1.php/cloud/user?format=json") QUrl("https://nd.nl.tab.digital/apps/dashboard/")"

 

 

 

P.S. Using the description "ownCloud Server URL, with, if necessary, with port" for the OC_SERVER field is wrong, because the field requires the server address (nd.nl.tab.digital), not its URL (https://nd.nl.tab.digital/), as stated in the description.

Edited by vvzvlad
Link to comment
3 minutes ago, vvzvlad said:

My nextcloud server is running at https://nd.nl.tab.digital/ and has the following WebDAV address: remote.php/dav/files/[email protected]/

So I set "OC_WEBDAV" to "remote.php/dav/files/[email protected]/" and I get the following errors in the logs: 


03-28 19:08:11:406 [ info sync.discovery ]: STARTING "" OCC::ProcessDirectoryJob::NormalQuery "" OCC::ProcessDirectoryJob::NormalQuery
03-28 19:08:11:407 [ info sync.accessmanager ]: 6 "PROPFIND" "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/" has X-Request-ID "af56746b-456d-40ef-a2e5-37c7404e5949"
03-28 19:08:11:407 [ info sync.networkjob ]: OCC::LsColJob created for "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/" + "/" "OCC::DiscoverySingleDirectoryJob"
03-28 19:08:12:064 [ warning sync.networkjob ]: QNetworkReply::ContentOperationNotPermittedError "Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"" QVariant(int, 405)

03-28 19:08:12:065 [ info sync.networkjob.lscol ]: LSCOL of QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/") FINISHED WITH STATUS "ContentOperationNotPermittedError Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\""
03-28 19:08:12:065 [ warning sync.discovery ]: LSCOL job error "Error transferring https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/ - server replied: Method Not Allowed" 405 QNetworkReply::ContentOperationNotPermittedError

 

They clearly have the wrong address "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"

 

Also, a strange error:

"03-28 19:08:11:130 [ info sync.networkjob ]: Redirecting "GET" QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/ocs/v1.php/cloud/user?format=json") QUrl("https://nd.nl.tab.digital/apps/dashboard/")"

 

 

 

P.S. Using the description "ownCloud Server URL, with, if necessary, with port" for the OC_SERVER field is wrong, because the field requires the server address (nd.nl.tab.digital), not its URL (https://nd.nl.tab.digital/), as stated in the description.

 

I see they offer a free 8GB account, I'll create one and look into it how to configure it.

You are right about the OC_SERVER section in the README, I'll update that later.

If I figured it out, I'll mention you in a new reply.

Link to comment

@vvzvlad


This works for me

 

OC_USER: USERNAME or EMAIL
OC_PASS: PASSWORD
OC_SERVER: mark.nl.tab.digital (ADDRESS MIGHT BE DIFFERENT FOR YOU, CHECK YOUR URL WHEN ACCESSING THE WEB INTERFACE)
OC_URLPATH: /
OC_FILEPATH: /
RUN_UID: Your Unraid User ID
RUN_GID: Your Unraid User's Group ID
TRUST_SELFSIGN: 0
- Advanced settings -
OC_WEBDAV: rempte.php/webdav
OC_PROTO: https
SYNC_HIDDEN: 0
SILENCE_OUTPUT: 1
RUN_INTERVAL: 30

 

image.png.c1b9c2ef24c3424dd51661884e738ed0.png

image.png.a72f4982597e1688859c1d22834b5019.png

Edited by Dyon
Link to comment
  • 1 year later...

I just installed the Owncloud-client.

When i use it to sync 1 directory, it works fine. 

I used the OC_Filepath with /TTD

2022-04-11 15:09:02.796140 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do.
2022-04-11 15:09:02.837049 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99
2022-04-11 15:09:03.548882 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100
2022-04-11 15:09:03.588270 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent'
2022-04-11 15:09:03.622686 [INFO] Running owncloudcmd as following:
2022-04-11 15:09:03.653833 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/remote.php/webdav/

 

 

But if I want to sync all the directories and use it with "/" it won't work

 

ErrorWarningSystemArrayLogin


2022-04-11 15:09:52.701808 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do.
2022-04-11 15:09:52.757745 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99
2022-04-11 15:09:53.659672 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100
2022-04-11 15:09:53.697707 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent'
2022-04-11 15:09:53.731473 [INFO] Running owncloudcmd as following:
2022-04-11 15:09:53.763963 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/owncloud/remote.php/webdav/
 

Any sugestions?

 

Link to comment
32 minutes ago, Sparkiee said:

I just installed the Owncloud-client.

When i use it to sync 1 directory, it works fine. 

I used the OC_Filepath with /TTD

2022-04-11 15:09:02.796140 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do.
2022-04-11 15:09:02.837049 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99
2022-04-11 15:09:03.548882 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100
2022-04-11 15:09:03.588270 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent'
2022-04-11 15:09:03.622686 [INFO] Running owncloudcmd as following:
2022-04-11 15:09:03.653833 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/remote.php/webdav/

 

 

But if I want to sync all the directories and use it with "/" it won't work

 

ErrorWarningSystemArrayLogin


2022-04-11 15:09:52.701808 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do.
2022-04-11 15:09:52.757745 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99
2022-04-11 15:09:53.659672 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100
2022-04-11 15:09:53.697707 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent'
2022-04-11 15:09:53.731473 [INFO] Running owncloudcmd as following:
2022-04-11 15:09:53.763963 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/owncloud/remote.php/webdav/
 

Any sugestions?

 

 

Your OC_WEBDAV path is incorrect for TransIP Stack, in Unraid edit the owncloud-client docker, and expand the advanced settings at the bottom and set OC_WEBDAV to this (without quotes): "remote.php/webdav"

Edit: Nevermind, yours is set correctly.

Change the:

OC_URLPATH: /owncloud/

to:

OC_URLPATH: /

Edited by Dyon
Link to comment
6 minutes ago, Dyon said:

 

Your OC_WEBDAV path is incorrect for TransIP Stack, in Unraid edit the owncloud-client docker, and expand the advanced settings at the bottom and set OC_WEBDAV to this (without quotes): "remote.php/webdav"

Edit: Nevermind, yours is set correctly.

Change the:

OC_URLPATH: /owncloud/

to:

OC_URLPATH: /

Just did this.

The log :

2022-04-11 15:46:35.313420 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do.
2022-04-11 15:46:35.354755 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99
2022-04-11 15:46:36.107088 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100
2022-04-11 15:46:36.145682 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent'
2022-04-11 15:46:36.179586 [INFO] Running owncloudcmd as following:
2022-04-11 15:46:36.210958 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/remote.php/webdav/

 

But nothing happens. Nothing is downloaded to my server and the data in teh target directory stays the same.

 

 

OC2.png

OC1.jpg

Link to comment

I don't see anything wrong with the other environment variables that you have set. Mine are exactly the same (I also use STACK)

Since using "/TTD" works for you, I don't think it's a OC_PASS problem, so I assume you are already using the WebDav App Token from STACK.

I suspect there might be a problem with the database that OwnCloud stores for synchronisation, since you switched from "/TTD" to "/" it might have gotten confused.

 

What I would do it:

Stop the container. As long as the container is stopped, there is no risk in removing the folder.

Remove the folder /mnt/user/data/Ralf/Stack/ from your Unraid.

Start the container again, the folder should get created automatically.

 

Edit:

These are my environment variables:

OC_USER    username
OC_PASS    webdav_app_token
OC_SERVER    my_ulr_for_stack.stackstorage.com
OC_URLPATH    /
OC_FILEPATH    /
RUN_UID    1000
RUN_GID    100
TRUST_SELFSIGN    0
Sync Location    /mnt/user/STACK/dyonr/
OC_WEBDAV    remote.php/webdav
OC_PROTO    https
SYNC_HIDDEN    0
SILENCE_OUTPUT    1
RUN_INTERVAL    30

 

Edited by Dyon
Link to comment

I don't know what happend.

But yesterday the sync didn't work. After leaving it for the night, this morning all files were synced. And it works both ways. Only if i upload a file from my pc to Stack, it doesnt show up in my folder on Unraid. Maybe I have to be a bit more patient.......

Link to comment
2 hours ago, Sparkiee said:

I don't know what happend.

But yesterday the sync didn't work. After leaving it for the night, this morning all files were synced. And it works both ways. Only if i upload a file from my pc to Stack, it doesnt show up in my folder on Unraid. Maybe I have to be a bit more patient.......

 

As far as I know (for my own experience), owncloud works sequential. So it will download all files first, when that is finished it will start the upload.

So, you are saying if you upload a file via the STACK PC Client, it doesn't show up in the Unraid folder? Does it appear on the STACK website?

Because I can't imagine it wouldn't sync that file

Link to comment

Exactly.

Files from my stack are in sync with the folders on my unraid server.

If I place something in a map on my Unraid server it will sync with the remote stack.

I connected my Stack to a network share on my work pc. If i copy a file from my work pc to my Stack, the files will show up on my stack (logged in on stack to check this) but will not be synced to my Unraid server. Pretty strange.

 

 

Link to comment
1 hour ago, Sparkiee said:

Exactly.

Files from my stack are in sync with the folders on my unraid server.

If I place something in a map on my Unraid server it will sync with the remote stack.

I connected my Stack to a network share on my work pc. If i copy a file from my work pc to my Stack, the files will show up on my stack (logged in on stack to check this) but will not be synced to my Unraid server. Pretty strange.

 

 

 

That is really strange. As a test, I mounted my STACK in Windows, added a file, and a few moments later it did appear in the STACK folder on my Unraid. So it works for me...

 

There are two things you can do.

1: Check the logs.

Set the SILENCE_OUTPUT of the container temporary to "0". This will spam the container log, and not everything would be readable because of that.

At the bottom of the spam, error should/could show up.

(I haven't implemented something to output the log somewhere, might do that soon though, since it won't be a lot of effort)

 

2: Start Fresh. There could be an underlying problem that isn't easily visibele. Yes, you would need to redownload/resync everything with Unraid again.

Stop the container. As long as the container is stopped, there is no risk in removing the folder.

Remove the folder /mnt/user/data/Ralf/Stack/ from your Unraid.

Start the container again, the folder should get created automatically.

Edited by Dyon
Link to comment

Shame on me.

The log tells me the disk is almost full and downloading files would exceed the "needed" free diskspace.

I forgot this test setup had less free disk space in comparison to my server. So i'll change the setting to sync only 1 folder just for testing it.

 

Link to comment
5 minutes ago, Sparkiee said:

Shame on me.

The log tells me the disk is almost full and downloading files would exceed the "needed" free diskspace.

I forgot this test setup had less free disk space in comparison to my server. So i'll change the setting to sync only 1 folder just for testing it.

 

 

Well, that explains a lot! Glad you found the issue. If you ever run into problems again, let me know!

Link to comment
  • 1 year later...

Hello,

unfortunately my Docker owncloud-client container is not working correct. 

Files or not beeing synced.

 

Here is my config:

998763898_2023-12-0612_55_40Container.thumb.png.c407cd94b4ac6cf205baf4156eac2124.png

501748432_2023-12-0612_56_33Container.thumb.png.eb83f2ce9ab818efc302249dab690e9d.png

 

The Log output looks like this:

 

1158130537_2023-12-0612_57_57.thumb.png.b51f9ad12057779de7d956b617aaa982.png

 

 

When I put files on either side (Owncloud Path "Upload" or Unraid Path "Owncloud Sync") the files are not beeing transfered.

 

I tried exact these parameters on my Windows computer with the owncloud command line interface and it worked out of the box, so the parameters (Paths and User/Password) are correct.

 

Windows command line output:

 

1258801338_2023-12-0613_39_38.thumb.png.b7fc8ca963baaee5c0d57a7cb48f154c.png

 

Any idea?

 

 

Link to comment

@Frank_B Config seems fine to me, matches mine.

If you visit the OC_SERVER + OC_WEBDAV URL in your browser, you should get a simple authentication prompt from your browser. If you login using your OC_USER and OC_PASS, it should display 'OK' (atleast for my owncloud implementation).

OC_SERVER + OC_WEBDAV URL is owncloud.?????.de/remote.php/dav/files/???????????????????????

If ??????????????????????? is your username, I don't think you need to include that.

 

Link to comment

@Dyon Thank you for the fast reply! 

 

When I visit OC_SERVER + OC_WEBDAV URL in my browser I get the authentication prompt and after signing in it displays "This is the WebDAV interface. It can only be accessed by WebDAV clients such as the ownCloud desktop sync client."

 

And yes, ???????????? is my username (in this case my e-mail address). Just to make sure I removed this part from the docker config, but did not change the behaviour.

 

Still I think it must be included in the URL because in my test with the windows command line client I had to include it as well - there it worked. 

 

Link to comment

@Frank_B Keep SILENCE_OUTPUT on 0, and check the unraid appdata/owncloudcmd/latest.log

The logging function is kinda written shitty by me, so it keeps overwriting itself every run, which is 30 by default. Set RUN_INTERVAL to 300 and check the log after a couple seconds. In this log file you can see if there any any obvious error messages. If sharing parts of the log, make sure to remove any personal info.

 

Something else I want to point out is that the version of owncloudcmd used by my docker runs version 2.11.1.8946 released 18th of August 2022, while the newest version 5.2.0.12726 is released on the 28th of November 2023. This MAY be a reason that it does not work for you.

The reason I did not update the version beyond 2.11.1.8946 is because I just couldn't get the newer versions to work, and the old version was still working fine (and still does for me).

I might give it another shot in the future.

Link to comment

 

This Path was totaly missing in my Docker config, so I added it manually and now I see the logfile in the path.

 

This is the content:

 

12-20 06:04:35:699 [ info sync.accessmanager ]:    2 "" "https://owncloud.????.de/remote.php/dav/files/???????????????/Upload/ocs/v1.php/cloud/capabilities?format=json" has X-Request-ID "2f88149c-5900-4924-8bc2-720c0fb49424"
12-20 06:04:35:699 [ info sync.networkjob ]:    Created OCC::JsonApiJob("https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json", "2f99149c-3640-4915-8bc2-720d0fb49424", "2f14149c-3640-5015-8bc2-710c0fb49424") for QObject(0x0)
12-20 06:04:35:945 [ warning sync.networkjob ]:    OCC::JsonApiJob("https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json", "2f88149c-3640-4915-8bc2-710c0fb49424", "2f88149c-3640-4915-8bc2-710c0fb49424", "Error transferring https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json - server replied: Forbidden") QNetworkReply::ContentAccessDenied "Server replied \"403 Forbidden\" to \"GET https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json\"" 403
12-20 06:04:35:945 [ info sync.networkjob.jsonapi ]:    JsonApiJob of QUrl("https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json") FINISHED WITH STATUS "ContentAccessDenied Server replied \"403 Forbidden\" to \"GET https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json\""
12-20 06:04:35:945 [ warning sync.networkjob.jsonapi ]:    Network error:  OCC::JsonApiJob("https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json", "2f88149c-3640-4915-8bc2-710c0fb49424", "2f88149c-3640-4915-8bc2-710c0fb49424", "Error transferring https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json - server replied: Forbidden") "Server replied \"403 Forbidden\" to \"GET https://owncloud.????.de/remote.php/dav/files/?????????????????/Upload/ocs/v1.php/cloud/capabilities?format=json\"" 403
12-20 06:04:35:945 [ debug default ]    [ main(int, char**)::<lambda ]:    Server capabilities QJsonObject()
12-20 06:04:35:946 [ fatal default ]:    Error connecting to server
 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.