Next cloud is not showing txt files


I am using the latest nextcloud

It’s not showing some txt files!

I went to the command line and created some txt files from there… I refresh the web browser and they don’t show


@vanman123 make this commands :
sudo chown root:www-data /var/www/html/nextcloud/data/abc/files/Documents/name.txt
sudo chmod 664 /var/www/html/nextcloud/data/abc/files/Documents/name.txt

( replace “name” by name of your txt file )

nextcloud can’t write into your txt file, it can be the cause

I guess he has also forgotten tho rescan the files via
occ files:scan --all

BTW: it is not recommended to store the files directly inside the nextcloud dir but instead create a separat nextcloud-datadir.

1 Like

thanks, i’m having some trouble running occ and particularly, occ files:scan --all

root@gizbo:~/nextcloud# ls -l occ
-rw-r–r-- 1 root root 283 Dec 15 20:51 occ

root@gizbo:~/nextcloud# ./occ files:scan --all
-bash: ./occ: Permission denied

root@gizbo:~/nextcloud# sudo ./occ files:scan -all
sudo: ./occ: command not found

(Then saw a suggestion online)

root@gizbo:~/nextcloud# sudo -u www-data php /var/www/nextcloud/occ files:scan -all
Could not open input file: /var/www/nextcloud/occ

(Then saw another suggestion online)

root@gizbo:~/nextcloud# sudo -u www-data php /var/www/html/nextcloud/occ files:scan -all

The “-a” option does not exist.

files:scan [–output [OUTPUT]] [-p|–path PATH] [–all] [–unscanned] [–shallow] [–home-only] [–] [<user_id>…]


It seems like the correct command in your case should be:

sudo -u www-data php /var/www/html/nextcloud/occ files:scan --all

(You were missing the double dash)


What parent directory would be good practise, for that directory?