Can't delete files in Nextcloud and error when I do with Filezilla ftp

Nextcloud version : 15.0.0
Operating system and version : 18.04.1 LTS
Apache : 2.0
PHP version : 7.1.26

I tried to delete two videos of 2GB or 3GB each via the internet browser and it didn’t work. I then connected to my ftp and manually forced the files to be deleted with Filezilla

Problem : when I sync with the Desktop client, it shows an error saying the 2 videos in question can’t be synced… when I go back to the FTP and also in the browser… the 2 videos are gone…

Is this the first time you’ve seen this error? Yes

How would you fix it ? :blush:

The output of your Nextcloud log in Admin > Logging:

The output of your file in ~/local/share/Nextcloud (

#=#=#=# Syncrun started 2019-02-03T22:31:41Z
#=#=#=#=# Propagation starts 2019-02-03T22:31:54Z (last step: 12485 msec, total: 12485 msec)
||BalaKior/MooSt/VID_20180910_212532.mp4|INST_NEW|Down|1536607532|c431632aa82f5b95a6cf8edf246696ff|3419671516|00007042ocqcr4m0dihg|1|Error transferring https://XXX.com/nextcloud/remote.php/dav/files/XXX/XXX/MooSt/VID_20180910_212532.mp4 - server replied: |503|0|0||||
#=#=#=# Syncrun finished 2019-02-03T22:32:16Z (last step: 21957 msec, total: 34443 msec)
#=#=#=# Syncrun started 2019-02-03T22:33:08Z
#=#=#=#=# Propagation starts 2019-02-03T22:33:16Z (last step: 7330 msec, total: 7330 msec)
||BalaKior/MooSt/VID_20180910_212532.mp4|INST_NEW|Down|1536607532|c431632aa82f5b95a6cf8edf246696ff|3419671516|00007042ocqcr4m0dihg|1|Error transferring https://XXX.com/nextcloud/remote.php/dav/files/XXX/MooSt/VID_20180910_212532.mp4 - server replied: |503|0|0||||
#=#=#=# Syncrun finished 2019-02-03T22:33:16Z (last step: 397 msec, total: 7728 msec)

You shouldn’t not change the data folder manually. If you do it, it is clear that the filecache-table is not up to date and shows files that do not exist any more (or doesn’t show files that were place manually). If you can’t delete them via web-interface in the first place, then there is probably something wrong with the permissions (were they placed manually)? FTP user and the webserver user might be different.

Can you create a new file on the web-interface and delete it afterward via webinterface as well?

Thanks @tflidd for your answer
Indeed I just created a text file on my web interface, wrote one sentence, saved it. Then deleted it without any problem, here is the printscreen of the activity board (in French) = supprimé = deleted

test%20nextcloud

I also made a copy of the 2 big videos of 2GB and 3GB to another file in the webinterface before manually delete by FTP those which I could’nt delete via the webinterface

And yesterday I tried to delete the copy of the 2 videos and it worked fine…

What can I do to fix the sync Desktop client ?
It keeps sending me notifications about the error of the 2 deleted videos by ftp

Run the occ files-scan manually from terminal.

Actually @tflidd I tried for ages to do the occ command but never worked
When I do this :
sudo -u www-data php occ
I end up with :
-u : command not found

I went on google, read some tutorials but I am stuck :frowning:

No idea, have you installed sudo? Or does this version not have the option -u, sudo --help should show you all option.

@tflidd I remember I tried -u with the previous version 16.04 LTS also
Here is what the sudo help gives me :

You have to enter everything in one line, -u is an option for the sudo command, you can’t run this as an isolated command!

I am not sure @tflidd I undestand well what you say :

  • i always used -u in one line with other commands
  • in case you were saying that I have to do instead sudo --help I did it and here is the result :

It seems the -u command exists but when I enter it on the terminal it says “command not found”

sudo -s gives you a root shell. sudo -u www-data command executes command as www-data user. Not sure if you can get the shell for user www-data.

Ok so I tried this time only
sudo -u www-data php occ
and I’ve got :
Could not open input file: occ

Up :blush: :top:
My Nextcloud desktop client won’t even synchronize now

Anyone has an idea to help ? :blush:

Go to your Nextcloud directory, e,g. /var/www/nextcloud .
Do “ls -alt occ”
If occ exists do a filescan:
sudo -u www-data php occ files:scan --all

Maybe something shows up.

Thanks @peteman52 for your answer
I went to my Nextcloud directory which seems to be under /.local/share/Nextcloud

Did ls -alt occ
And is showed ls: impossible to access 'occ': no document nor files of this kind

That’s strange. Maybe you are in the wrong directory?
Do a ls -alt
There should be at least some directories like config, data, settings, core etc.
And some files like .htaccess, cron.php, index.html, public.php, remote.php etc.

When I do a search on my files, I find two Nextcloud files
I did the ls -alt command on both and here are the resulsts :

XXX@YYY:~/.local/share/Nextcloud$ ls alt
ls: impossible d’accéder à ‘alt’: Aucun fichier ou dossier de ce type
XXX@YYY:~/.local/share/Nextcloud$ ls -alt
total 716
drwx------ 30 XXX XXX 4096 févr. 21 17:12 …
-rw-rw-r-- 1 XXX XXX 718053 févr. 18 21:42 thenameofmynextcloudfile_sync.log
drwxrwxr-x 2 XXX XXX 4096 janv. 27 21:29 .
XXX@YYY:~/.local/share/Nextcloud$

And the second

XXX@YYY:~/.config/Nextcloud$ ls -alt
total 20
drwx------ 36 XXX XXX 4096 févr. 21 17:12 …
drwxrwxr-x 2 XXX XXX 4096 févr. 19 08:57 .
-rw-rw-r-- 1 XXX XXX 652 févr. 19 08:57 nextcloud.cfg
-rw-rw-r-- 1 XXX XXX 8 févr. 19 08:57 cookies0.db
-rw-r–r-- 1 XXX XXX 418 janv. 27 21:14 sync-exclude.lst

As far as I can see those files are in your home directory.
You have to go to your document root /var/www/nextcloud
I’m sure there you will find the occ command. You must execute this command in this directory too.

I again tried to run an overall search on the " / " directory
Opened everysingle file which could seems to be Nextcloud

And I also went @peteman52 to /var/www...
Did a CTRL+H in case they were hidden file but nothing showed up…

Capture%20du%202019-02-23%2019-25-20