owncloud

cURL PUT Request with Nextcloud / owncloud API

大兔子大兔子 提交于 2020-01-25 07:33:36
问题 I tried to update an existing Nextcloud user through their API. When I do it directly via shell it works curl -u user:pass -X PUT "https://example.org/ocs/v1.php/cloud/users/admin" -H "OCS-APIRequest: true" -d key="quota" -d value="5GB" But when I try to do it via PHP with the following code it always returns "failure 997" $url = 'https://' . $ownAdminname . ':' . $ownAdminpassword . '@example.org/ocs/v1.php/cloud/users/admin'; $ch = curl_init($url); curl_setopt($ch, CURLOPT_CUSTOMREQUEST,

Centos7 搭建owncloud云存储

瘦欲@ 提交于 2020-01-09 23:51:00
本文首发: https://www.somata.work/2019/Centos7SetupOwncloudCloudStorage.html 首先准备必要的软件和资料. 这里我已经整理好了: 百度云共享 不过最好还是自己去官网上下。这里只不过是提供了快捷方式。 owncloud官网: https://www.owncloud.org 安装vmware 和 虚拟机的安装就不演示了。下面直接开始演示安装LAMP环境, 和 owncloud的安装。 推荐使用putty或者其他ssh软件远程连接到虚拟机再开始输入命令。 比直接再虚拟机内完成操作方便。 我这里使用xshell进行远程连接。 效果都是一样的不必在意 配置国内yum源 mkdir /root/back mv /etc/yum.repos.d/* /root/back/ # 备份yum源 curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo # 配置国内yum源 curl -o /etc/yum.repos.d/CentOS-epel.repo http://mirrors.aliyun.com/repo/epel-7.repo # 添加扩展yun源 curl -o /etc/yum.repos.d

How can I verify my selfsigned certificate when using easywebdav?

主宰稳场 提交于 2020-01-05 10:12:48
问题 I know how to connect to my owncloud with python, by using easywebdav. I'm using a selfsigned certificate and verify_ssl=False , but that makes me vulnerable to man-in-the-middle attacks, the only reason to use ssl in the first place. I'm using Fedora and tried adding my servers certificate to $HOME/.pki/CA/cacert.pem , but it still fails. 回答1: You already have your server certificate in $HOME/.pki/CA/cacert.pem . But to be complete for others, you can get a certificate with python like this:

Owncloud upload file to specific folder - curl

我们两清 提交于 2020-01-04 06:54:43
问题 I want upload files through curl on my owncloud server in a specific folder. For example: http://www.myowncloudserver.com/remote.php/webdav/{MY_FOLDER} . At this time I can't upload a file to a folder on my owncloud server. Any ideas? 回答1: $ curl --user username:password -X PUT "https://www.myowncloudserver.com/remote.php/webdav/MY_FOLDER" --data-binary @"file.txt" 来源: https://stackoverflow.com/questions/36955796/owncloud-upload-file-to-specific-folder-curl

How can I connect to owncloud with python using easywebdav?

不羁岁月 提交于 2020-01-01 01:14:25
问题 I'm trying to connect to a owncloud instance with python. I've found easywebdav that should make it easy to connect via webdav, but when trying to connect I'm getting "404 Not Found" import easywebdav webdav = easywebdav.connect('test.org/owncloud/remote.php/webdav/', username='user', password='pass', protocol='https', port=443, verify_ssl=False) print webdav.ls(".") I would expect a list of files found on my owncloud instance, but I'm getting python ./test.py Traceback (most recent call last

Resumable upload with CURL in owncloud

风流意气都作罢 提交于 2019-12-13 12:47:44
问题 I am uploading my files to owncloud using curl request. If connection interrupts how can resume the upload? because i have to upload large files. Below is my code $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'http://server/owncloud/remote.php/webdav/' . basename($filename)); curl_setopt($ch, CURLOPT_NOPROGRESS, false ); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_USERPWD, "user:password"); curl_setopt($ch, CURLOPT_PUT, 1); $fh_res = fopen($file_path_str, 'r');

Owncloud files:scan create function

懵懂的女人 提交于 2019-12-11 16:33:03
问题 I'm looking to add a button on a external app developped for owncloud, I would like to add a function to scan files for a user. But i don't find any sources to make this .. What should be the function to scan files without doing it in command lines with php occ files:scan ? Best regards , thanks a lot in advance 回答1: I'm using Nextcloud instead of Owncloud but I never had the need for such a button. It happens all automatically on my side. Nextcloud has also the setting 'filesystem_check

Create user on Owncloud

孤者浪人 提交于 2019-12-11 12:41:34
问题 I searched, could not find a correct way to create new users on owncloud server. I tried to apply what User Provisioning API says, but I always get this response: <ocs> <meta> <status>failed</status> <statuscode>999</statuscode> <message>Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services. DEBUG OUTPUT: debug output: http request method: POST http request uri: /owncloud/ocs/v1.php/cloud/users%20-d

Upload file with tags through OwnCloud or NextCloud API

主宰稳场 提交于 2019-12-11 06:06:00
问题 I have a database of files that are already tagged. Now, I would like to upload these files to an OwnCloud or NextCloud Server and pass on my already existing tags so that they show up as tags in the respective system. I wasnt able yet to find a way how I could do that in the documentation, does anyone have an idea how I could do it? Thanks! 回答1: I just made available the source code of the (remote) file tagging micro-service for Nextcloud on github (https://github.com/julianthome/taggy). The

Python library to access a CalDAV server

…衆ロ難τιáo~ 提交于 2019-12-11 04:03:17
问题 I run ownCloud on my webspace for a shared calendar. Now I'm looking for a suitable python library to get read only access to the calendar. I want to put some information of the calendar on an intranet website. I have tried http://trac.calendarserver.org/wiki/CalDAVClientLibrary but it always returns a NotImplementedError with the query command, so my guess is that the query command doesn't work well with the given library. What library could I use instead? 回答1: I recommend the library,