There are few likely reasons for this to happen because I have actually seen this issue a few times in differ situations. It is frustrating because OwnCloud might have had the permissions previously or it has access to the files through have 777 permissions. It is an issue because the desktop client will become out of sync with the server client. A huge issue since the point of OwnCloud is to keep these two in sync.
You need to make www-data the owner and group of your OwnCloud directory.
cd /var/www/owncloud/data chmod -R www-data:www-data *
If you are using an external hard drive, be sure to make www-data the owner of the hard drive, or at least the folder that OwnCloud is referencing. Use the “chmod” command above.
Least likely but it happened to me:
OwnCloud lost track of the files and you need to tell it to rescan your files. oneseventeen describes the solution to his own question in the sources. Depending on your owncloud size, this may take a while but it cleared up the problem for me.
cd /var/www/owncloud php console.php files:scan --all