Disable client sync


#1

Hi there,
Is there a way to disable client sync for certain groups or everyone?
I'd like the users to use the web interface only?

Thank you


#2

Do every user as its own computer ? Because if you want user to only use the web interface, the simplest solution is to not install the desktop client for them.

If everyone share a single or a few devices, maybe you can hide the desktop client icon from the tray and the synchronized folders (ex: I sync ~/.owncloud online but directories inside this folder are symlinked to more usual and usefull places).

None of these are perfect solutions as you can't forbid someone to install the desktop client (unless they don't have administration rights on the machine) nor restrain them to look after the synced directories (unless you can give them permissions that forbid basic users to explore them), but I don't think there's a built-in way to do it.


#3

Thanks
The users will be using their own devices so they will have admin access, no way to prevent them from installing the client.
I was hoping there was a setting on the server side to disable this


#4

You may filter out there access with firewall rules.


#5

For such non-home user use cases there is also the "Enterprise Edition" which includes a feature [1] which should exactly allow what you're looking for.

[1] https://owncloud.com/features/#FileFirewall


#6

Can you elaborate a bit on the firewall rules, I thought the client used http and https ports? If I block those won't l block them out of the web interface too?
Thanks but we are a school and don't have money for the Enterprise Edition :slight_smile:


#7

You can only handle this on webserver level, e.g.:


#8

Thanks, looks like file firewall is an enterprise feature.
Is there a way to block external storage sync? I know it doesn't sync by default but nothing is stopping the students from manually selecting it?


#9

If the external storage has a fixed URL pattern, you can still do that by disallowing it from the web server config.
Maybe return 503 for PROPFIND on those folders. Worth a try.


#10

Sorry I've never done this before, could you give me more info please?


#12

The link you provided is asking me to enter a username and password


#13

Hello,

Yes there is :slight_smile:

I hope this tip helps anyone who needs it.

In my case, I’ve disabled synchronization desktop client, my users only access the web interface.

Open the file /var/www/html/owncloud/remote.php

Inside the file, locate the section below:

[…]
function resolveService ($ service) {
$ services = [
‘webdav’ => ‘dav / appinfo / v1 / webdav.php’,
‘dav’ => ‘dav / appinfo / v2 / remote.php’,
‘caldav’ => ‘dav / appinfo / v1 / caldav.php’,
‘calendar’ => ‘dav / appinfo / v1 / caldav.php’,
‘carddav’ => ‘dav / appinfo / v1 / carddav.php’,
‘contacts’ => ‘dav / appinfo / v1 / carddav.php’,
‘files’ => ‘dav / appinfo / v1 / webdav.php’,
];
[…]

Now comment the line ‘dav’:

[…]
function resolveService ($ service) {
$ services = [
‘webdav’ => ‘dav / appinfo / v1 / webdav.php’,
# ‘dav’ => ‘dav / appinfo / v2 / remote.php’,
‘caldav’ => ‘dav / appinfo / v1 / caldav.php’,
‘calendar’ => ‘dav / appinfo / v1 / caldav.php’,
‘carddav’ => ‘dav / appinfo / v1 / carddav.php’,
‘contacts’ => ‘dav / appinfo / v1 / carddav.php’,
‘files’ => ‘dav / appinfo / v1 / webdav.php’,
];
[…]

Close the file and run the synchronization test through the desktop client.

You will see that an error will occur.

See:

I came to this conclusion by performing a TCPDUMP between the server and desktop client.

If you have better suggestion, please share, bye.