Description
openedon Sep 4, 2020
Steps to reproduce
Unknown, this is a reoccurring issue since about two weeks. If I delete the folder it gives the same error but at a different folder. None of these folders actually have any odd characters in them.
Expected behaviour
Files with scan correctly for the user.
Actual behaviour
It throws an exception when it encounters this directory. It says:
"Exception during scan: opendir(/var/www/html/data/emilia/files/////////////////////........////////////////////): failed to open dir: Filename too long
Followed by literally 4000 lines of generic errors.
Additional information
I have noticed that if it errors at a folder it is always an empty folder, removing the folder makes it error at another folder, it is currently failing at folders in the Games/ directory, it has not failed outside of that folder as far as I can remember.
Server configuration detail
Operating system: Linux 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64
Webserver: nginx/1.17.10 (fpm-fcgi)
Database: mysql 10.4.13
PHP version:
7.4.8
Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, ctype, curl, dom, fileinfo, filter, ftp, hash, iconv, json, mbstring, SPL, PDO, pdo_sqlite, session, posix, readline, Reflection, standard, SimpleXML, Phar, tokenizer, xml, xmlreader, xmlwriter, mysqlnd, cgi-fcgi, apcu, bcmath, exif, gd, gmp, imagick, intl, ldap, memcached, pcntl, pdo_mysql, pdo_pgsql, redis, sodium, zip, Zend OPcache
Nextcloud version: 19.0.0 - 19.0.0.12
Updated from an older Nextcloud/ownCloud or fresh install: 18.0.0
Where did you install Nextcloud from: Docker Hub
List of activated apps
Enabled:
- accessibility: 1.5.0
- activity: 2.12.0
- apporder: 0.11.0
- audioplayer: 2.11.2
- bruteforcesettings: 2.0.1
- calendar: 2.0.4
- cloud_federation_api: 1.2.0
- comments: 1.9.0
- contacts: 3.3.0
- contactsinteraction: 1.0.0
- dav: 1.15.0
- extract: 1.2.4
- federatedfilesharing: 1.9.0
- federation: 1.9.0
- files: 1.14.0
- files_pdfviewer: 1.8.0
- files_rightclick: 0.16.0
- files_sharing: 1.11.0
- files_trashbin: 1.9.0
- files_versions: 1.12.0
- files_videoplayer: 1.8.0
- firstrunwizard: 2.8.0
- issuetemplate: 0.7.0
- logreader: 2.4.0
- lookup_server_connector: 1.7.0
- mail: 1.4.1
- metadata: 0.12.0
- nextcloud_announcements: 1.8.0
- notes: 3.6.4
- notifications: 2.7.0
- oauth2: 1.7.0
- occweb: 0.0.7
- password_policy: 1.9.1
- privacy: 1.3.0
- provisioning_api: 1.9.0
- richdocuments: 3.7.3
- serverinfo: 1.9.0
- settings: 1.1.0
- sharebymail: 1.9.0
- spreed: 9.0.3
- support: 1.2.1
- survey_client: 1.7.0
- systemtags: 1.9.0
- text: 3.0.1
- theming: 1.10.0
- twofactor_backupcodes: 1.8.0
- updatenotification: 1.9.0
- viewer: 1.3.0
- workflowengine: 2.1.0
Disabled:
- admin_audit
- bookmarks
- checksum
- encryption
- files_external
- photos
- recommendations
- user_ldap
Configuration (config/config.php)
{
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"password": "***REMOVED SENSITIVE VALUE***",
"port": 6379
},
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "19.0.0.12",
"overwrite.cli.url": "http:\/\/nextcloud.diademiemi.me",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"app_install_overwrite": [
"caniupdate",
"occweb"
],
"overwriteprotocol": "https",
"updater.secret": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_sendmailmode": "smtp",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpsecure": "ssl",
"mail_smtpport": "465",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"theme": "",
"loglevel": 2,
"maintenance": false,
"filelocking.enabled": false
}
Docker Compose (docker-compose.yml)
version: '3'
services:
db:
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=***REMOVED SENSITIVE VALUE***
env_file:
- db.env
networks:
nextcloud:
ipv4_address: 172.25.0.5
aliases:
- db
redis:
image: redis:alpine
restart: always
networks:
nextcloud:
ipv4_address: 172.25.0.6
aliases:
- redis
app:
image: nextcloud:19-fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- /storage/nc/:/var/www/html/data/
environment:
- MYSQL_HOST=db
- REDIS_HOST=redis
env_file:
- db.env
depends_on:
- db
- redis
networks:
nextcloud:
ipv4_address: 172.25.0.7
aliases:
- app
web:
build: ./web
restart: always
volumes:
- nextcloud:/var/www/html:ro
- /storage/nc/:/var/www/html/data/
depends_on:
- app
networks:
nextcloud:
ipv4_address: 172.25.0.8
aliases:
- web
cron:
image: nextcloud:19-fpm-alpine
restart: always
volumes:
- nextcloud:/var/www/html
- /storage/nc/:/var/www/html/data/
entrypoint: /cron.sh
depends_on:
- db
- redis
networks:
nextcloud:
ipv4_address: 172.25.0.9
aliases:
- cron
volumes:
db:
nextcloud:
networks:
nextcloud:
external:
name: nextcloud
Logs
Web server error log
Web server is not used
Nextcloud log
No activity
OCC log
Nextcloud_Files_Scan_Log_Rundeck.txt
EDIT:
Script used to change www-data User ID to one used in host system
docker-compose up -d --build
docker exec -it nextcloud_app_1 apk --no-cache add shadow
docker exec -it nextcloud_app_1 usermod -u 1000 www-data
docker exec -it nextcloud_app_1 groupmod -g 1001 www-data
docker exec -it nextcloud_app_1 chown -R www-data:www-data /var/www/html
docker exec -it --user www-data nextcloud_app_1 php occ config:system:set overwriteprotocol --value="https"
docker restart nextcloud_app_1
I don't think this is related, but just documenting this.
Just updated to the latest version, did not resolve the issue.