External Storage - Folders and Files are not recognized

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): NextCloudPi 24.0.5
Operating system and version (eg, Ubuntu 20.04): Linux 5.15.61-v8+ aarch64 (
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.54 (Debian)
PHP version (eg, 7.4): 8.1.11

The issue you are facing:

Since a new clean installation of nextcloud 24 (used 20 now for over a year without problems) I have the Problem that my NAS, connected to nextcloud with the “external_storage” plugin, doesn’t show me all files and folders even after using the occ command for scanning all attached drives.
The third folder in the screenshot has around 1,2 TB of data, but nextcloud only lists a small part of it (e.g. 126,7 GB)
grafik

Going one step deeper, by opening the Folder with missing files, i see no datasize on most of the folders.

All folders shown contain files but I can’t acces them because they are not shown.

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

Steps to replicate it:

  1. Even after a bunch of clean installations same error.
  2. Backup from the old installation (nextcloud 20) doesn’t work either

If generally needed I will post the output of the logs

We literally have just posted exactly the same issue, what’s going on??

So I tried the solution mentioned in the other post.

But still it doesn’t get all files and folders.
But it’s more than before.

grafik

Does anybody have an solution for this?

I can’t understand why it worked flawlessly with the old nextcloud version.

There was no solution in my thread, it didn’t work at all for me, it found nothing at all.

I cannot see how this doesn’t have more visibility, it’s clearly a major issue affecting samba, maybe a linux kernel upgrade related??

@djdoom I don’t know if it’s an option for you but I switched to NFS, mounting via fstab and using “local” in external storage.

Much faster.

thanks for the information, tried it but I’m not able to delete and create files.
I can only see all files on the storage.

think there are some permissions missing

tried it like the following in the /etc/fstab and the credentials for my NAS are located in the .smbcredentials in the home folder.


//192.168.xxx.xx/NAS /mnt/NAS cifs uid=1000,gid=1000,rw,credentials=/home/pi/.smbcredentials,file_mode=0777,dir_mode=0777  0 0

How did you mount your NAS in the fstab?

@djdoom
Maybe the Nextcloud user e.g. www-data has no access to some directorys and/or files.

Can you go on the command line and post some user rights. Also you can test it this way:

sudo -u www-data cat /external-mount/path/to/an/example-existing-ascii-file.txt
Only if www-data has access www-data can see the ascii-file with cat. Use an existing text file.
Does ist work for in a in Nextcloud “hidden” file?

I’m having the same problem when rescanning regularly, but what bugs me the most is that when I delete the cronjob for a few days the files start showing again, after some access via the web interface.

I’m using the path option which curiosly also affects files that arend in the specified path after a rescan.

I would be pretty pleased if anyone has a solution to this topic.

1 Like

Here the problem still has no solution. But i found a workaround as mentioned from @shaung in his topic.

I mounted the NAS drives in the /etc/fstab with cifs.
Poorly I’m not able to delete files directly in nextlcoud. Therefore I have to clean the NAS-Drive directly on the PC.

Just add this to the fstab File for each Drive you want to mount and make sure you created the mount-Location (/mnt/Drive1) before with mkdir

# URL  NAS-Drive+Volume|Local mount|cifs + arguments
//192.168.178.**/Drive1 /mnt/Drive1 cifs noperm,rw,uid=33,gid=33,rw,credentials=/home/pi/.smbcredentials,file_mode=0777,dir_mode=0777  0 0

The Login-Information is stored in the /home/pi/.smbcredentials file

it just contains of

username=*myusername*
password=*mypassword*

So far it is workin, but as mentioned before I don’t have the option to delete files.

Hi,

i have the same Problem with SFTP and NC 25.0.1.
When i use occ files:scan --all --p /User/files/ some folders are 0KB.
When i specify the 0KB folders in the occ command one by one they will eventually be scanned.
So its not a permission problem i think.

I have the same problem, some SMB folders in External Storage are inaccessible and we don’t understand the problem what the problem may be. Is there a moderator who knows the External Storage APP and can give a solution? Currently NextCloud is not able to share remote folders in SMB, that’s incredible! Please tell me how I can find support even for a fee.
Thank you

Hey @Armandopc357

Thanks for your input here. But as you posted at international part of the forum we demand answers in English.

So would you please translate your answer to English ?

Maybe with the help of deepl.com

Hello

I am facing exactly the same issue here:
Since upgrading from v24.0.7 to the latest v25 only a fraction of files and folders are shown.

sudo -u www-data php8.0 occ files:scan —all
will just not scan most of files and folders of the external storage.

sudo -u www-data php8.0 occ files:scan —path= “/userid/files/name-of-external-storage/sub-folder”
works way better on external storage if sub folder is given in the command (otherwise not working either).
Unfortunately the biggest sub folder keeping a few hundreds of GBs just shows up with like 1/10 of all files and folders that are available via SMB.

So
sudo -u www-data php8.0 occ files:scan —path= "/userid/files/name-of-external-storage/sub-folder/next-sub-folder”
will indeed scan the next sub folder and show it in Nextcloud.
Of course this does not come handy with a few hundreds of GBs of data to process manually this way…

Which means workaround is here but not feasible.

What is wrong with the
occ files:scan —all
and external storage starting with v25 of Nextcloud?

Cheers
Vince

1 Like

This post was flagged by the community and is temporarily hidden.

i would suggest to open a new thread with all the infos about your systems that you could get.
Especially where is the external Storage, how is it mounted, how are permissions, who owns it, etc…