I can't delete the files

#1

I have my own LXC where nextcloud is installed.
Today I needed to upload about 6000 files to the server. I uploaded them via FTP.
then I did
sudo -u www-data php /var/www/my_web/occ files:scan all
output
Unknown user 1 all
±--------±------±-------------+
| Folders | Files | Elapsed time |
±--------±------±-------------+
| 0 | 0 | 00:00:00 |
±--------±------±-------------+
Now all the files are visible through the web. If I want to delete someone’s file, it doesn’t work. I can only copy and download. Look at https://imgur.com/49lVUCx
How can I delete files over the web?

#2

Looks like this is a folder someone shared with you. He needs to grant you “Change” permission on the shared folder, if you want to be allowed to delete files again.

#3

Problem solved
I copied all files via FTP on NC
then
cd /var/www/path_web_whereis_occ
sudo -u www-data php occ files:scan --all
Directories and folders are visible through the web this time, but I can’t remove, rename etc …
sudo ls -la /path_nextclud_storage_user/my_data

   drwxr-xr-x 32 gusto gusto  4096 máj  5 11:14 electricity
   drwxr-xr-x 12 gusto gusto  4096 máj  5 11:24 information
   drwxr-xr-x  3 gusto gusto  4096 máj  5 10:38 manuals
   drwxr-xr-x  2 gusto gusto 12288 máj  4 19:03 Math
   drwxr-xr-x  2 gusto gusto  4096 máj  5 10:07 uncategorized

Change owner to www-data recursively -R
sudo chown -R www-data:www-data /path_nextclud_storage_user/my_data

sudo ls -la /path_nextclud_storage_user/my_data

   drwxr-xr-x 32 www-data www-data  4096 máj  5 11:14 electricity
   drwxr-xr-x 12 www-data www-data  4096 máj  5 11:24 information
   drwxr-xr-x  3 www-data www-data  4096 máj  5 10:38 manuals
   drwxr-xr-x  2 www-data www-data 12288 máj  4 19:03 Math
   drwxr-xr-x  2 www-data www-data  4096 máj  5 10:07 uncategorized

sudo -u www-data php occ files:scan --all

all done

1 Like