nextcloud / nextcloud/updater

[Bug]: Upgrade from 32.0.1 to 32.0.2 fails with "Check for write permissions"

Open
#688 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage bug feature: writability
Dominant language
PHP
Stars
51
Forks
40
Avg merge
2d 19h
Merged PRs (30d)
3

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Upgrade from 32.0.1 to 32.0.2 fails with "Check for write permissions" for "config.php,v" when using Nextcloud's web updater.

I use RCS to version my nextcloud/config/config.php file, Nextcloud has no reason to write to RCS/config.php,v (RCS's created file).

Steps to reproduce
  1. Create an RCS directory under nextcloud/config/
  2. Within nextcloud/config use RCS's ci -l config.php which creates an RCS/config.php,v file (note permissions on RCS/config.php,v do not include "writable")
  3. Open Nextcloud's web updater and click "Start update"
  4. "Check for write permissions" fails with the following text:
The following places can not be written to:

    config.php,v
Expected behavior

Update passes write permissions check for files not managed by Nextcloud.

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{                                                           
    "system": {                                             
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",              
            "***REMOVED SENSITIVE VALUE***"                                 
        ],                                                  
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",                                  
        "version": "32.0.1.2",     
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",   
        "dbtableprefix": "oc_",                             
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",      
        "installed": true,  
        "htaccess.RewriteBase": "\/",                       
        "mail_smtpmode": "smtp",                            
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",                                                           
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",          
        "memcache.locking": "\\OC\\Memcache\\Redis",        
        "redis": {     
            "host": "***REMOVED SENSITIVE VALUE***",        
            "port": 0,
            "dbindex": 0,
            "password": "***REMOVED SENSITIVE VALUE***",    
            "timeout": 1.5
        },                                                  
        "maintenance": false,                               
        "theme": "",   
        "loglevel": 2, 
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud.log",             
        "logfilemode": 416,
        "logdateformat": "F d, Y H:i:s",                    
        "enable_previews": true,                            
        "preview_max_x": 1920,        
        "preview_max_y": 1080,                              
        "enabledPreviewProviders": [                      
            "OC\\Preview\\PNG",                   
            "OC\\Preview\\JPEG",                
            "OC\\Preview\\GIF",   
            "OC\\Preview\\BMP",                  
            "OC\\Preview\\XBitmap",                         
            "OC\\Preview\\MP3",                             
            "OC\\Preview\\TXT",                       
            "OC\\Preview\\MarkDown",                        
            "OC\\Preview\\PDF",                             
            "OC\\Preview\\SVG",                             
            "OC\\Preview\\TIFF",                      
            "OC\\Preview\\Font",                        
            "OC\\Preview\\Movie"                  
        ],                  
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",                              
        "mysql.utf8mb4": true,                              
        "defaultapp": "apporder",                        
        "default_phone_region": "AU",                                                                                   
        "maintenance_window_start": 16,                     
        "app_install_overwrite": []
    }                                                       
}
List of activated Apps
Enabled:                                                    
  - activity: 5.0.0-dev.0
  - bookmarks: 16.0.1                                       
  - bruteforcesettings: 5.0.0-dev.0               
  - circles: 32.0.0                                         
  - cloud_federation_api: 1.16.0  
  - comments: 1.22.0                                        
  - contactsinteraction: 1.13.1
  - dashboard: 7.12.0
  - dav: 1.34.2         
  - deck: 1.16.1                                            
  - federatedfilesharing: 1.22.0     
  - federation: 1.22.0                                      
  - files: 2.4.0                                            
  - files_downloadlimit: 5.0.0-dev.0                        
  - files_external: 1.24.0
  - files_pdfviewer: 5.0.0-dev.0
  - files_reminders: 1.5.0   
  - files_sharing: 1.24.0                                                                                               
  - files_trashbin: 1.22.0                                                                                              
  - files_versions: 1.25.0                                  
  - firstrunwizard: 5.0.0-dev.0                             
  - impersonate: 3.0.0    
  - logreader: 5.0.0-dev.0                                  
  - lookup_server_connector: 1.20.0          
  - metadata: 0.23.0      
  - notifications: 5.0.0-dev.0                              
  - oauth2: 1.20.0                                          
  - password_policy: 4.0.0-dev.0         
  - photos: 5.0.0-dev.1                                     
  - previewgenerator: 5.11.0                                                                                            
  - privacy: 4.0.0-dev.0                                    
  - profile: 1.1.0
  - provisioning_api: 1.22.0                                                                                            
  - related_resources: 3.0.0-dev.0                                                                                      
  - serverinfo: 4.0.0-dev.0                                 
  - settings: 1.15.1                                                                                                    
  - sharebymail: 1.22.0                                                                                                 
  - support: 4.0.0-dev.0                                    
  - systemtags: 1.22.0                                                                                                  
  - tasks: 0.17.1                                                                                                       
  - text: 6.0.1                                             
  - theming: 2.7.0                                          
  - twofactor_backupcodes: 1.21.0                        
  - updatenotification: 1.22.0                           
  - user_status: 1.12.0                                     
  - viewer: 5.0.0-dev.0                                     
  - weather_status: 1.12.0                                  
  - webhook_listeners: 1.3.0                                
  - workflowengine: 2.14.0
Disabled:                                                   
  - admin_audit: 1.22.0
  - app_api: 32.0.0 (installed 32.0.0)                      
  - encryption: 2.20.0   
  - nextcloud_announcements: 4.0.0-dev.0 (installed 1.4.0)  
  - recommendations: 5.0.0-dev.0 (installed 0.8.0)
  - survey_client: 4.0.0-dev.0 (installed 1.7.0)            
  - suspicious_login: 10.0.0-dev.0
  - twofactor_nextcloud_notification: 6.0.0-dev.0           
  - twofactor_totp: 14.0.0                                  
  - user_ldap: 1.23.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
From updater.log:

2025-11-21T10:35:12+1100 nEHWevIAdp [info] getChangelogURL()
2025-11-21T10:35:12+1100 nEHWevIAdp [info] end of checkForUpdate() Update to Nextcloud 32.0.2 available. (channel: "stable")<br /><span class="light">Following file will be downloaded automatically:</span> <code class="light">https://download.nextcloud.com/server/releases/nextcloud-32.0.2.zip</code><br /><a class="external_link" href="https://nextcloud.com/changelog/#32-0-2" target="_blank" rel="noreferrer noopener">Open changelog ↗</a>
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] request to updater
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] currentStep()
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] POST request for step "1"
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] startStep("1")
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] checkForExpectedFilesAndFolders()
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] end of checkForExpectedFilesAndFolders()
2025-11-21T10:35:32+1100 DNRyyTAD3o [info] endStep("1")
2025-11-21T10:35:32+1100 6oU8xxfS0m [info] request to updater
2025-11-21T10:35:32+1100 6oU8xxfS0m [info] currentStep()
2025-11-21T10:35:32+1100 6oU8xxfS0m [info] Step 1 is in state "end".
2025-11-21T10:35:32+1100 6oU8xxfS0m [info] POST request for step "2"
2025-11-21T10:35:33+1100 6oU8xxfS0m [info] startStep("2")
2025-11-21T10:35:33+1100 6oU8xxfS0m [info] checkWritePermissions()
2025-11-21T10:35:33+1100 6oU8xxfS0m [error] POST request failed with UpdateException
2025-11-21T10:35:33+1100 6oU8xxfS0m [error] Exception: UpdateException
Message: 
Code:0
Trace:
#0 /var/www/html/nextcloud/updater/index.php(1421): Updater->checkWritePermissions()
nextcloud/server#1 {main}
File:/var/www/html/nextcloud/updater/index.php
Line:398
Data:
Array
(
    [0] => config.php,v
)
Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in updater/index.php at checkWritePermissions(), identified by the updater log, and reproduce the failure with an RCS/config.php,v file lacking write permission. Trace why that file is included in the reported paths; done means the web updater no longer blocks on files it does not manage while still checking required updater files.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.