server icon indicating copy to clipboard operation
server copied to clipboard

"An unknown error has occurred" when upload any files with extensions.

Open mrxenoquaten opened this issue 7 years ago • 34 comments

Hi,

I installed nextcloud. I cannot upload files. But I can upload files by deleting extensions. Interesting.

How can i fix this problem? I love nextcloud. Please help. Sorry for my bad English. Thanks.

PHP version: 7.3 Nextcloud version: 16.0.3

upload

mrxenoquaten avatar Jul 26 '19 19:07 mrxenoquaten

having the same problem :(

OverlOrDGT avatar Jul 26 '19 23:07 OverlOrDGT

The same error occurs after I cancel uploading process (even if it's single file) image

1ndahous3 avatar Jul 27 '19 05:07 1ndahous3

Plaeas provide some more technical information. How have you installed Nextcloud? On what kind of server? What apps have you activated? You may use the system report button on the Support page in your admin settings to generate the necessary information automatically.

wiswedel avatar Jul 28 '19 10:07 wiswedel

Hi,

I tried with both softaculous and upload via ftp but I failed. I haven't activated any App by myself. I have reviewed the support page but could not find a solution.

SERVER INFO: cPanel Version | 80.0 (build 22) Apache Version | 2.4.39 PHP Version | 7.3.7 MySQL Version | 10.3.16-MariaDB Architecture | x86_64 Operating System | linux Kernel Version | 3.10.0-962.3.2.lve1.5.26.1.el7.x86_64

ACTIVE SERVICES: apache_php_fpm | up |   clamd | up |   cpanellogd | up |   cpdavd | up |   cphulkd | up |   cpsrvd | up |   crond | up |   cxswatch | up |   dnsadmin | up |   exim (exim-4.92-1.cp1180.x86_64) | up |   exim-587 | up |   ftpd | up |   httpd (2.4.39 (cPanel)) | up |   imap | up |   ipaliases | up |   letsencrypt-cpanel | up |   lfd | up |   lmtp | up |   mailman | up |   mysql (10.3.16-MariaDB) | up |   nscd | up |   pop | up |   rsyslogd | up |   spamd | up |   sshd | up |   queueprocd | up |  

PHP EXTENSIONS: php extensions

mrxenoquaten avatar Jul 30 '19 15:07 mrxenoquaten

You may use the system report button on the Support page in your admin settings to generate the necessary information automatically.

I have reviewed the support page but could not find a solution.

image

wiswedel avatar Aug 01 '19 20:08 wiswedel

Exactly same issue here.

I deleted everything and started from scratch, as users where not able to upload any files. Users can create folders but cannot upload any files. If the extension gets deleted, the file can be uploaded.

Operating system: Linux 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 Webserver: Apache (fpm-fcgi) Database: mysql 5.7.27 PHP version: 7.3.7 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, cgi-fcgi, bcmath, calendar, ctype, curl, dom, ftp, gd, iconv, imap, intl, json, mbstring, mysqlnd, PDO, Phar, posix, SimpleXML, soap, sockets, sqlite3, tokenizer, xml, xmlwriter, xsl, zip, mysqli, pdo_mysql, pdo_sqlite, wddx, xmlreader, Zend OPcache Nextcloud version: 16.0.3 - 16.0.3.0 Updated from an older Nextcloud/ownCloud or fresh install: Where did you install Nextcloud from: unknown Signing status List of activated apps Configuration (config/config.php) { "instanceid": "REMOVED SENSITIVE VALUE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": [ "xxx" ], "datadirectory": "REMOVED SENSITIVE VALUE", "dbtype": "mysql", "version": "16.0.3.0", "overwrite.cli.url": "https://xxx/nextcloud", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true } External storages: files_external is disabled Encryption: no User-backends: • OC\User\Database Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

I hope this issue can be solved quickly as nextcloud cannot be used at all for the moment.

stoneubi avatar Aug 02 '19 16:08 stoneubi

Server configuration detail Operating system: Linux 3.10.0-962.3.2.lve1.5.26.1.el7.x86_64 #1 SMP Fri Jun 28 06:30:57 EDT 2019 x86_64

Webserver: LiteSpeed (litespeed)

Database: mysql 10.3.17

PHP version: 7.1.30

Modules loaded: Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, gmp, SPL, iconv, pcntl, readline, Reflection, session, standard, shmop, SimpleXML, mbstring, tokenizer, xml, litespeed, bcmath, dom, fileinfo, gd, imagick, imap, intl, json, exif, mcrypt, mysqlnd, mysqli, PDFlib, PDO, pdo_mysql, pdo_sqlite, Phar, posix, rar, soap, sockets, tidy, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, ionCube Loader, Zend OPcache

Nextcloud version: 16.0.3 - 16.0.3.0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status Array ( )

List of activated apps Enabled:

  • accessibility: 1.2.0
  • activity: 2.9.1
  • audioplayer: 2.7.2
  • bruteforcesettings: 1.3.0
  • cloud_federation_api: 0.2.0
  • comments: 1.6.0
  • dav: 1.9.2
  • federatedfilesharing: 1.6.0
  • federation: 1.6.0
  • files: 1.11.0
  • files_pdfviewer: 1.5.0
  • files_rightclick: 0.13.0
  • files_sharing: 1.8.0
  • files_texteditor: 2.8.0
  • files_trashbin: 1.6.0
  • files_versions: 1.9.0
  • files_videoplayer: 1.5.0
  • firstrunwizard: 2.5.0
  • gallery: 18.3.0
  • logreader: 2.1.0
  • lookup_server_connector: 1.4.0
  • music: 0.10.0
  • nextcloud_announcements: 1.5.0
  • notifications: 2.4.1
  • oauth2: 1.4.2
  • password_policy: 1.6.0
  • privacy: 1.0.0
  • provisioning_api: 1.6.0
  • recommendations: 0.4.0
  • serverinfo: 1.6.0
  • sharebymail: 1.6.0
  • support: 1.0.0
  • survey_client: 1.4.0
  • systemtags: 1.6.0
  • theming: 1.7.0
  • twofactor_backupcodes: 1.5.0
  • updatenotification: 1.6.0
  • viewer: 1.0.0
  • workflowengine: 1.6.0 Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_ldap Configuration (config/config.php) { "instanceid": "REMOVED SENSITIVE VALUE", "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": [ "REMOVED SENSITIVE VALUE"," ], "datadirectory": "REMOVED SENSITIVE VALUE", "dbtype": "mysql", "version": "16.0.3.0", "overwrite.cli.url": REMOVED SENSITIVE VALUE", "dbname": "REMOVED SENSITIVE VALUE", "dbhost": "REMOVED SENSITIVE VALUE", "dbport": "", "dbtableprefix": "oc_", "dbuser": "REMOVED SENSITIVE VALUE", "dbpassword": "REMOVED SENSITIVE VALUE", "installed": true } External storages: files_external is disabled

Encryption: no

User-backends:

OC\User\Database Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36

mrxenoquaten avatar Aug 04 '19 12:08 mrxenoquaten

Anything in the logs?

kesselb avatar Aug 11 '19 15:08 kesselb

No nothing. Checked every nextcloud and server log. Absolutely nothing. No permission errors. I deleted the whole installation including the database and started from scratch 2 times with a fresh source download from nextcloud website. Still the same. The only spelling error message I get is in the latest android app. The error “you don’t have Permission to upload files to this folder” is displayed. The user, who tries to upload files do have Admin permission. Again, if the extension of the file gets deleted e.g. test.pdf renamed to test then the files can easily be uploaded via the web interface as also with the android app.

stoneubi avatar Aug 13 '19 11:08 stoneubi

Mind to try a test instance: https://try.nextcloud.com?

kesselb avatar Aug 13 '19 11:08 kesselb

I deleted the whole installation including the database and started from scratch 2 times with a fresh source download from nextcloud website. Still the same.

That really looks like something's wrong on your infrastructure side.

When you add 'loglevel' => 0, to the config.php, the log gets way more verbose and might tell us more.

Also, please note:

  • Lightspeed is not a recommended nor supported web server
  • Consider upgrading PHP to version 7.3

wiswedel avatar Aug 13 '19 14:08 wiswedel

Finally I solved the error by disabling ModSecurity in cpanel. (Found this tipp on nextcloud help). The qeustion is how to have a working solution for netcloud with ModSecurity enabled.

stoneubi avatar Aug 16 '19 15:08 stoneubi

The qeustion is how to have a working solution for netcloud with ModSecurity enabled.

Nextcloud has nothing to do with that, you have to configure it in ModSecurity.

  • You can add a new ModSecurity rule that allow the affected problem.
  • You can whitelist the affected ModSecurity rule completely

mritzmann avatar Aug 16 '19 15:08 mritzmann

Finally I solved the error by disabling ModSecurity in cpanel. (Found this tipp on nextcloud help). The qeustion is how to have a working solution for netcloud with ModSecurity enabled.

Thanks for your feedback :+1:

kesselb avatar Aug 16 '19 15:08 kesselb

Finally I solved the error by disabling ModSecurity in cpanel. (Found this tipp on nextcloud help). The qeustion is how to have a working solution for netcloud with ModSecurity enabled.

Disabling ModSecurity solved the problem.

Thank you stoneubi thank you all.

1

mrxenoquaten avatar Sep 01 '19 09:09 mrxenoquaten

This issue is also affecting me, and I'm not able to disable/remove modsecurity. Files under ~10 MB upload fine, but files over 10 MB with extensions will not upload, giving a "Unknown Error" message with no other error messages that I can find. The same file with extension removed works fine. Is there no solution for those who cannot remove or disable modsecurity? What causes this behavior?

KW4NP avatar Sep 29 '20 20:09 KW4NP

This seems to be relevant: https://help.nextcloud.com/t/cant-upload-file-size-more-than-10mb/86266/3 Wordpress on the same host has no trouble with uploads over 10 MB, so it seems like this is a fixable issue.

KW4NP avatar Sep 29 '20 20:09 KW4NP

This issue is also affecting me, and I'm not able to disable/remove modsecurity.

  • Nextcloud cannot influence the behaviour of ModSecurity.
  • It is not possible for a PHP software like Nextcloud to access the underlying ModSecurity.

It also makes no sense that a software should be able to directly influence ModSecurity Rules (ModSecurity would be worthless). Nextcloud really can't do anything about it. So I don't understand what you expect from nextcloud now.

mritzmann avatar Sep 30 '20 13:09 mritzmann

I'm wondering if it might be possible for nextcloud to handle file uploads slightly differently to avoid hitting this limit in modsecurity.

I understand that nextcloud cannot change the behavior of modsecurity, but wordpress and flow upload both upload files that do not upload using the standard nextcloud process in the same environment. It follows that nextcloud could work with modsecurity as well.

I'd like to understand what modsecurity is flagging, and if it would be possible to change the behavior to avoid triggering modsecurity. The software cannot change the rules, but it can work within the rules to avoid problems.

So, to summarize, I'd like for nextcloud to work with common modsecurity settings as that seems like a reasonable request and something that would benefit the nextcloud community.

On Wed, Sep 30, 2020, 9:02 AM Markus Ritzmann [email protected] wrote:

This issue is also affecting me, and I'm not able to disable/remove modsecurity.

  • Nextcloud cannot influence the behaviour of ModSecurity.
  • It is not possible for a PHP software like Nextcloud to access the underlying ModSecurity.
  • It also makes no sense that a software should be able to directly influence ModSecurity Rules (ModSecurity would be worthless).

Nextcloud really can't do anything about it. So I don't understand what you expect from nextcloud now.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/nextcloud/server/issues/16575#issuecomment-701375723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIQYQZOKWVEBZEOHZ4ECBW3SIMT45ANCNFSM4IHGXKOA .

KW4NP avatar Sep 30 '20 23:09 KW4NP

Having the same problem and still stuck since there is no "ModSecurity" to disable. Nextcloud worked for a long time and the issue is pretty new and it really only appears when file is bigger than 10MB.

Do I need to change a firewall rule? What do I need to change server side that it will work again?

thanks for any hints.

magdesign avatar Oct 01 '20 08:10 magdesign