Repository navigation
Description
File "Test_ä.md" triggers "stat: cannot statx '/var/www/html/data/admin/files/Test_.md': No such file or directory" when using command "sudo docker exec --user www-data nextcloudtest_app_1 php occ files:scan admin" in ssh.
This happnes form 22.1.1 on. 22.1.0 is not affected.
Steps to reproduce
deploy stack "nextcloudtest"
version: '2'
services:
dbtest:
image: yobasystems/alpine-mariadb:latest
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: unless-stopped
volumes:
- /home/pi/nextclouddbtest:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpasswordtest
- MYSQL_PASSWORD=passwordtest
- MYSQL_DATABASE=nextcloudtest
- MYSQL_USER=nextcloudtest
app:
image: nextcloud:22.1.1
ports:
- 8081:80
links:
- dbtest
volumes:
- /home/pi/nextcloudtest:/var/www/html
restart: unless-stopped
environment:
- MYSQL_DATABASE=nextcloudtest
- MYSQL_USER=nextcloudtest
- MYSQL_PASSWORD=passwordtest
- MYSQL_HOST=dbtest
- NEXTCLOUD_DATA_DIR=/var/www/html/data
In browser:
Create admin account, finish installation
Create testfile "Test_ä.md"
In ssh run:
sudo docker exec --user www-data nextcloudtest_app_1 php occ files:scan admin
Expected behaviour
Output 22.1.0 without error:
Starting scan for user 1 out of 1 (admin)
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 5 | 29 | 00:00:01 |
+---------+-------+--------------+
Actual behaviour
Output 22.1.1 with error:
Starting scan for user 1 out of 1 (admin)
stat: cannot statx '/var/www/html/data/admin/files/Test_.md': No such file or directory
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 5 | 29 | 00:00:00 |
+---------+-------+--------------+
Server configuration
Operating system:
Raspberry Pi 4
Raspbian GNU/Linux 10 (buster)
Kernerl: 5.10.63-v7l+
Docker version 20.10.9, build c2ea9bc
Web server:
Database:
yobasystems/alpine-mariadb:latest
PHP version:
Nextcloud version:
22.1.1
Updated from an older Nextcloud/ownCloud or fresh install:
fresh install
Where did you install Nextcloud from:
docker hub
Signing status:
Signing status
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
List of activated apps:
App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder
Nextcloud configuration:
Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder
or
Insert your config.php content here.
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)
Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption: yes/no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP configuration (delete this part if not used)
LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder
Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';
Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.
Client configuration
Browser:
Operating system:
Logs
Web server error log
Web server error log
Insert your webserver log here
Nextcloud log (data/nextcloud.log)
Nextcloud log
Insert your Nextcloud log here
Browser log
Browser log
Insert your browser log here, this could for example include:
a) The javascript console log
b) The network log
c) ...
Activity
ei23fxg commentedon Nov 3, 2021
solracsf commentedon Nov 4, 2021
Can't reproduce on 22.2.0
File is then visible on the WebUI.
[-]nextcloud 22.1.1: file with special character "ä" triggers "stat: cannot statx" when using "occ files:scan"[/-][+]Filename with special character "ä" triggers `stat: cannot statx` when using `occ files:scan`[/+]chrnaum commentedon Nov 4, 2021
Just checked with nextcloud:latest (22.2.0.2)
Here, issue still exists.
I'm using Raspberry Pi OS Lite, which is 32bit, btw.
I create the testfile in Nextcloud, therefore it is visible from the beginning.
pi@raspberrypi:~ $ sudo docker exec --user www-data nextcloudtest_app_1 php occ files:scan admin
Starting scan for user 1 out of 1 (admin)
stat: cannot statx '/var/www/html/data/admin/files/Test_.md': No such file or directory
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 5 | 29 | 00:00:00 |
+---------+-------+--------------+
pi@raspberrypi:~ $ sudo docker exec --user www-data nextcloudtest_app_1 php occ status
pzzszk commentedon Nov 12, 2021
I have the exact same issue before & after upgrading to Version 22.2.1.2.
When issuing the command "./occ files:scan --all" everything works fine, except for the one file with a £ (pound sterling) symbol in the filename. The folders (or groups folders) application code seems to have 'normalised' the file name and dropped the £ symbol from the filename prior to issuing the "stat". Therefore, it can't find the file & it issues the warning.
This issue has already been raised in nextcloud/groupfolders/issues/1665
My error message is:
stat: cannot stat '/mnt/md0/nextcloud/data/__groupfolders/1/Accounts/Expenditure/Expenses - SF/Foodbank receipt - 2020-12-09 - Tesco 1 x 20 Vouchers.pdf': No such file or directory
The 'real filename' for the above file is ".......Tesco 1 x £20 Vouchers.pdf"
Hope this helps with the investigation.
tigermick commentedon Nov 14, 2021
Hi,
I have the same issue too ...
Before, no problem with the sames files ... but recently (maybe since updating to version 22) , when I try to do occ files:scan, I have a stat error for all file with é è à â ê ... specials characters ... in the file name.
Same problem with recent 22.2.2 version
chrnaum commentedon Nov 19, 2021
Error still present in 22.2.3.0
chrnaum commentedon Dec 6, 2021
Fixed with 23.0.0.10.
pi@raspberrypi:~ $ sudo docker exec --user www-data nextcloud_app_1 php occ status
fschrempf commentedon Dec 16, 2021
I'm guessing that this was fixed with #29605!? Just for reference.