Files folder is not generated out of the box

Hi folks,
I am maintaining a Nextcloud Hub 9 (30.0.2) instance that has a patched version of the CAS app installed to interact with a LDAP authentication service.

At first login of new users the files folder is not generated automatically out of the box.

Have anyone heard of or have experience with this behaviour of Nextcloud?

Cheers!

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 9 (30.0.2)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Linux h26 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • None
  • PHP version (e.g, 8.3):
    • PHP 8.2.27
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • No idea
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Managed Server/Archive
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

If new users are created the Files folder is not generated automatically out of the box.

Steps to replicate it (hint: details matter!):

  1. If new users are created the Files folder is not generated automatically out of the box.

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

PASTE HERE

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

PASTE

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "version": "30.0.2.2",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "htaccess.IgnoreFrontController": true,
        "dbtype": "pgsql",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.debug": false,
        "upgrade.disable-web": true,
        "filelocking.enabled": true,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5,
            "read_timeout": 1.5
        },
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "log_type": "file",
        "logfile": "\/home\/pacs\/ecg04\/users\/nextcloud\/var\/log\/nextcloud.log",
        "loglevel": 3,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "logdateformat": "F d, Y H:i:s",
        "maintenance": false,
        "maintenance_window_start": 5,
        "updater.release.channel": "stable",
        "allow_user_to_change_display_name": false,
        "skeletondirectory": "",
        "show_whats_new": false,
        "app_install_overwrite": [
            "user_cas"
        ],
        "trashbin_retention_obligation": "30, 35",
        "mail_smtpauth": 1,
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 3.0.0
  - announcementcenter: 7.0.1
  - app_api: 4.0.0
  - appointments: 2.3.3
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.6
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - comments: 1.20.1
  - contacts: 6.1.1
  - contactsinteraction: 1.11.0
  - dav: 1.31.1
  - deck: 1.14.2
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - forms: 4.3.4
  - groupfolders: 18.0.6
  - impersonate: 1.17.0
  - integration_openstreetmap: 2.0.1
  - keeweb: 0.6.20
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - notifications: 3.0.0
  - notify_push: 0.7.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - polls: 7.2.5
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - quota_warning: 1.20.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.2
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - spreed: 20.0.2
  - systemtags: 1.20.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - theming_customcss: 1.17.0
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - user_cas: 1.10.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0

Hello,

I had this issue attempting to use OpenID/SAML so not exactly the same issue that you are having but it appeared to be preempting the folder creation/assignment functions when users were logging in.

Removing the configuration/app and going back to defaults removed the problem but also did not provide the attempted group share/file environment settings automation…

Is this a new installation or an upgrade to an existing one?
Was it working prior to any updates or never working?
Does removing CAS allow a user to be created with the file directory?

Is there a call in CAS to properly configure the user - creating the $userHome? Are the data directory permissions correct, does the skeleton directory exist - any user folder related issues appearing in the nextcloud.log file?

The CAS app has a note that its not been updated in over 2 years and has not been tested with the last 3 NC releases. Not sure if that is an issue but have you tried other LDAP integrations to compare the results?

2 Likes

FYI: The files folder in an account’s data directory isn’t created at account creation time. It’s created at first login.

2 Likes

Dear @jtr ,
Thank you very much for clarification. That is right and I adjusted this issue according to your suggestion.

I can’t speak to CAS specifically, but looking at the code it does call IUserSession::login() so all the standard first time login code should run.

However, it’s an ancient app so many things have changed.

Have you checked your Nextcloud log? There may be clues there.

If nothing in the log… glancing at the code, I suggest setting your loglevel to 0 (carefully) and monitoring a login on a new account.

1 Like