"You don't have permission to upload or create files here" Just after 20.0.5 fresh install with occ on dreamhost shared hosting

Hi, I have a dreamhost shared hosting and everything was working great in v18. However, after some several issues not related to this topic, I decide to start again with a clean install. So I installed a v20.0.5 through occ and there were no issues. Unfortunately, I keep having a “You don’t have permission to upload or create files here” in the root of my user, I can’t even modify the default files. I can still manage other aspects of my cloud but nothing related to file management.

$ php occ files:scan --all
The current PHP memory limit is below the recommended value of 512MB.
Starting scan for user 1 out of 1 (perro)
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 5       | 17    | 00:00:00     |
+---------+-------+--------------+
$ php occ status      
The current PHP memory limit is below the recommended value of 512MB.
  - installed: true
  - version: 20.0.5.2
  - versionstring: 20.0.5
  - edition: 
$ php occ update:check
The current PHP memory limit is below the recommended value of 512MB.
Everything up to date
$ php occ maintenance:repair
The current PHP memory limit is below the recommended value of 512MB.
 - Repair MySQL collation
     - All tables already have the correct collation -> nothing to do
 - Repair mime types
 - Clean tags and favorites
     - 0 tags of deleted users have been removed.
     - 0 tags for delete files have been removed.
     - 0 tag entries for deleted tags have been removed.
     - 0 tags with no entries have been removed.
 - Repair invalid shares
 - Move .step file of updater to backup location
 - Add move avatar background job
     - Add background job
 - Add preview cleanup background jobs
 - Fix potential broken mount points
     - No mounts updated
 - Repair language codes
 - Install new core bundle components
 - Add log rotate job
 - Clear frontend caches
     - Image cache cleared
     - SCSS cache cleared
     - JS cache cleared
 - Clear every generated avatar on major updates
 - Add preview background cleanup job
 - Queue a one-time job to cleanup old backups of the updater
 - Cleanup invalid photocache files for carddav
 - Add background job to cleanup login flow v2 tokens
 - Remove potentially over exposing share links
     - No need to remove link shares.
 - Clear access cache of projects
 - Reset generated avatar flag
 - Keep legacy encryption enabled
 - Check encryption key format
 - Remove old dashboard app config data
 - Fix component of birthday calendars
     - 0 birthday calendars updated.
 - Regenerating birthday calendars to use new icons and fix old birthday events without year
     - Adding background jobs to regenerate birthday calendar
 - Fix broken values of calendar objects
    0 [->--------------------------]
 - Registering building of calendar search index as background job
     - Add background job
 - Registering background jobs to update cache for webcal calendars
     - Added 0 background jobs to update webcal calendars
 - Registering building of calendar reminder index as background job
     - Add background job
 - Clean up orphan event and contact data
     - 0 events without a calendar have been cleaned up
     - 0 properties without an events have been cleaned up
     - 0 changes without a calendar have been cleaned up
     - 0 cached events without a calendar subscription have been cleaned up
     - 0 changes without a calendar subscription have been cleaned up
     - 0 contacts without an addressbook have been cleaned up
     - 0 properties without a contact have been cleaned up
     - 0 changes without an addressbook have been cleaned up
 - Remove activity entries of private events
     - Removed 0 activity entries
 - Fix the share type of guest shares when migrating from ownCloud
 - Copy the share password into the dedicated column
 - Set existing shares as accepted
 - Update OAuth token expiration times
 - Switches from default updater server to the customer one if a valid subscription is available
 - Send an admin notification if monthly report is disabled
 - Add background job to check for backup codes
 - Populating added database structures for workflows
$ php occ maintenance:mimetype:update-db
The current PHP memory limit is below the recommended value of 512MB.
Added mimetype "video/3gpp" to database
...
Added 138 new mimetypes
Updated 0 filecache rows
$ php occ maintenance:mimetype:update-js 
The current PHP memory limit is below the recommended value of 512MB.
mimetypelist.js is updated
$ php occ maintenance:theme:update       
The current PHP memory limit is below the recommended value of 512MB.
mimetypelist.js is updated
Image cache cleared
$ php occ maintenance:update:htaccess  
The current PHP memory limit is below the recommended value of 512MB.
.htaccess has been updated
$ ls -al
total 140
drwxr-xr-x 14 myuser pg4566500  4096 Jan 14 18:52 .
drwx--x--- 17 myuser adm        4096 Jan 14 18:57 ..
-rw-r--r--  1 myuser pg4566500  3122 Jan 14 19:28 .htaccess
-rw-------  1 myuser pg4566500  1024 Jan 14 18:52 .rnd
-rw-r--r--  1 myuser pg4566500   101 Jan 14 01:35 .user.ini
drwxr-xr-x 41 myuser pg4566500  4096 Jan 14 01:38 3rdparty
-rw-r--r--  1 myuser pg4566500 17234 Jan 14 01:35 AUTHORS
-rw-r--r--  1 myuser pg4566500 34520 Jan 14 01:35 COPYING
drwxr-xr-x 48 myuser pg4566500  4096 Jan 14 18:51 apps
drwxr-xr-x  2 myuser pg4566500   101 Jan 14 18:55 config
-rw-r--r--  1 myuser pg4566500  3893 Jan 14 01:35 console.php
drwxr-xr-x 22 myuser pg4566500  4096 Jan 14 01:38 core
-rw-r--r--  1 myuser pg4566500  5083 Jan 14 01:35 cron.php
drwxrwx---  5 myuser pg4566500  4096 Jan 14 19:25 data
-rw-r--r--  1 myuser pg4566500   156 Jan 14 01:35 index.html
-rw-r--r--  1 myuser pg4566500  2960 Jan 14 01:35 index.php
drwxr-xr-x  6 myuser pg4566500   150 Jan 14 01:35 lib
-rw-r--r--  1 myuser pg4566500   283 Jan 14 01:35 occ
drwxr-xr-x  2 myuser pg4566500    30 Jan 14 01:35 ocm-provider
drwxr-xr-x  2 myuser pg4566500    68 Jan 14 01:35 ocs
drwxr-xr-x  2 myuser pg4566500    30 Jan 14 01:35 ocs-provider
-rw-r--r--  1 myuser pg4566500  3102 Jan 14 01:35 public.php
-rw-r--r--  1 myuser pg4566500  5332 Jan 14 01:35 remote.php
drwxr-xr-x  4 myuser pg4566500   155 Jan 14 01:35 resources
-rw-r--r--  1 myuser pg4566500    26 Jan 14 01:35 robots.txt
-rw-r--r--  1 myuser pg4566500  2379 Jan 14 01:35 status.php
drwxr-xr-x  3 myuser pg4566500    45 Jan 14 01:35 themes
drwxr-xr-x  2 myuser pg4566500    53 Jan 14 01:36 updater
-rw-r--r--  1 myuser pg4566500   382 Jan 14 01:38 version.php
$ ls -al data/
total 24
drwxrwx---  5 myuser pg4566500 4096 Jan 14 19:25 .
drwxr-xr-x 14 myuser pg4566500 4096 Jan 14 18:52 ..
-rw-rw-r--  1 myuser pg4566500  542 Jan 14 18:51 .htaccess
-rw-rw-r--  1 myuser pg4566500    0 Jan 14 18:51 .ocdata
drwxrwxr-x  9 myuser pg4566500  129 Jan 14 18:56 appdata_ocelsau8oyiv
drwxrwxr-x  2 myuser pg4566500   34 Jan 14 19:25 files_external
-rw-rw-r--  1 myuser pg4566500    0 Jan 14 18:51 index.html
-rw-r-----  1 myuser pg4566500 8229 Jan 14 19:28 nextcloud.log
drwxrwxr-x  4 myuser pg4566500   42 Jan 14 18:52 admin

Finally, the Settings over the web client:

There are some errors regarding your setup.

    Tu servidor web aĂșn no esta correctamente configurado para permitir la sincronizaciĂłn de archivos porque la interfaz WebDAV parece estar rota. 

    The PHP memory limit is below the recommended value of 512MB.
    The "Strict-Transport-Security" HTTP header is not set to at least "15552000" seconds. For enhanced security, it is recommended to enable HSTS as described in the security tips ↗.

    No se ha configurado el caché de memoria. Para mejorar el desempeño, por favor configura un memcahce, si estå disponible. Puedes encontrar mås información en la documentación.
    El OPcache de PHP no estå configurado correctamente. Para un mejor desempeño se recomienda usar las sigueintes configuraciones en el archivo php.ini:

    opcache.enable=1
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=10000
    opcache.memory_consumption=128
    opcache.save_comments=1
    opcache.revalidate_freq=1

    This instance is missing some recommended PHP modules. For improved performance and better compatibility it is highly recommended to install them.
        gmp
    MySQL version "5.7.28-log" is used. Nextcloud 21 will no longer support this version and requires MySQL 8 or higher.

In all my years using ownCloud-Nextcloud I have never experience this issue :confused: I will appreciate the help.

Cheers!

Hi @NikaZhenya, maybe you have an user permission issue:
the user ‘pg4566500’ manages your nextcloud server ?

if yes try this :
chmod -R 775 /path-nextcloud-user-data

I have the same issue. I am also on Dreamhost and was on 20.0.4. I was able to use it fine last Tuesday and the next day I get the “You don’t have permission to upload or create files here” error. Like NikaZhenya, I am able to manage the instance, even upgraded to 20.0.5, but the error remains. I have downloaded all my files, deleted everything and did a fresh install, but no luck. I also created a new subdomain and database and did a fresh install in a brand new location, but it has the same error. Could it be something Dreamhost has done, like change access rights or something?

I was never able to run anything on Dreamhost with sudo, something about user not in the access list, or something. (yes I am a bit of a beginner on Linux)

Hi @DataTaika , which user manages nextcloud server ( on ubuntu with apache it is www-data) ??

this command should work:

chmod -R 775 /path-nextcloud-user-data

Exactly this. It was working fine on dreamhost shared hosting and suddenly stop working. I am gonna try the suggestion of @Mageunic

and don’t forgt to ask your supportguys from dreamhost


Unfortunately chmod -R 775 did nothing for me. I’ll try the DH support next. @JimmyKater, let me know if you learn anything.

I just did, they use sudo for chmod and chown to change the user to my dreamhost user and it didn’t work. They also told me that, because their policy, they can’t change the user to www-data.

cc @DataTaika

@NikaZhenya so try this : chmod -R 777 /path-nextcloud-user-data

I used chmod -R 775 /path-nextcloud-user-data and chmod -R 777 /path-nextcloud-user-data over my data directory and it didn’t work, but the outcome is a slightly different. In both cases the warning You don’t have permission to upload or create files heredisappeared, but 1) the nav between files is not showing (img1) and 2) when I try to open a document, like Example.md, it just get stuck in loading (img2).

I left here the web explorer console output:

Content Security Policy: Las opciones de esta pĂĄgina han bloqueado la carga de un recurso en inline ("script-src"). utils.js:35:9
JQMIGRATE: Migrate is installed, version 1.4.1 jquery-migrate.min.js:2:551
OCA.Files.Sidebar initialized Sidebar.js:37:10
Content Security Policy: Las opciones de esta pĂĄgina han bloqueado la carga de un recurso en eval ("script-src"). global.js:10:10
OCA.Sharing.ShareSearch initialized ShareSearch.js:33:10
OCA.Sharing.ExternalLinkActions initialized ExternalLinkActions.js:33:10
OCA.Viewer initialized Viewer.js:46:10
OCA.Files.Settings initialized Settings.js:29:10
Files_PDFViewer initialized for public page 
Object { isPublicPage: null, canDownload: true, isSecureViewerAvailable: false }
public.js:30:9
Please do NOT wait for the DOMContentLoaded before registering your viewer handler Viewer.vue:217
XHRGEThttps://MYDOMAIN/ocs/v2.php/apps/text/workspace?path=%2F
[HTTP/2 404 Not Found 1084ms]

[DEBUG] unified-search: Unified Search initialized with the following providers 
Object { 0: {
}, 1: {
}, 2: {
}, 3: {
}, 4: {
}, 5: {
}, 6: {
}, app: "unified-search", uid: "perro" }
unified-search.js:1:271870
could not load recommendation preview 
error { target: img, isTrusted: true, srcElement: img, currentTarget: img, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, 
 }
main.js:53:2008
could not load recommendation preview 
error { target: img, isTrusted: true, srcElement: img, currentTarget: img, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, 
 }
main.js:53:2008
could not load recommendation preview 
error { target: img, isTrusted: true, srcElement: img, currentTarget: img, eventPhase: 2, bubbles: false, cancelable: false, returnValue: true, defaultPrevented: false, composed: false, 
 }
main.js:53:2008
Uncaught (in promise) TypeError: e.t0.response is undefined
    e notifications-main.js:303
    l runtime.js:63
    _invoke runtime.js:293
    v runtime.js:118
    D notifications-main.js:284
    o notifications-main.js:284
    promise callback*D notifications-main.js:284
    i notifications-main.js:284
    S notifications-main.js:284
    S notifications-main.js:284
    j notifications-main.js:303
    e notifications-main.js:303
    l runtime.js:63
    _invoke runtime.js:293
    v runtime.js:118
    D notifications-main.js:284
    i notifications-main.js:284
    S notifications-main.js:284
    S notifications-main.js:284
    E notifications-main.js:303
    t notifications-main.js:303
    l runtime.js:63
    _invoke runtime.js:293
    v runtime.js:118
    O notifications-main.js:303
    i notifications-main.js:303
    I notifications-main.js:303
    I notifications-main.js:303
    _fetch notifications-main.js:303
    _backgroundFetch notifications-main.js:303
    setInterval handler*setupBackgroundFetcher notifications-main.js:303
    mounted notifications-main.js:303
    Ue notifications-main.js:7
    Kt notifications-main.js:7
    insert notifications-main.js:7
    w notifications-main.js:7
    la notifications-main.js:7
    _update notifications-main.js:7
    r notifications-main.js:7
    get notifications-main.js:7
    pn notifications-main.js:7
    mount notifications-main.js:7
    $mount notifications-main.js:7
    _init notifications-main.js:7
    Ln notifications-main.js:7
    <anonymous> notifications-main.js:323
    n notifications-main.js:1
    <anonymous> notifications-main.js:1
    <anonymous> notifications-main.js:1
notifications-main.js:303:1209

@NikaZhenya have you the user www-data?
if yes make this:
chown -R myuser:www-data /path-nextcloud-user-data
chown -R myuser:www-data /path-nextcloud-server
chmod -R 775 /path-nextcloud-server

This is odd and I hope @DataTaika can confirm, but after several days in the same situation, now everything is working as expected. I didn’t do anything new since my last post, so I can’t know what happened.

What is sure is that dreamhost shared hosting has MySQL 5.7 and in Nextcloud 21 it is not gonna work anymore, so if dreamhost doesn’t update it, other server is gonna be neccesary.

Thanks for the help. I won’t mark as solved because right now at least there is no explanation.

Cheers!

1 Like

Yes, @NikaZhenya, it was the same for me. Over the weekend I installed Nextcloud 20.0.5 once again, this time without installing the recommended apps (I do not know if that made any difference), and it has been working fine so far. I still suspect the problem originated with DreamHost and they have now found and resolved it.

Actually
 no. I installed it 4 days ago and was able to restore and upload all my files again at that time. My Nextcloud is pretty static, usually I add only 1 or 2 files a month. I wanted to upload one today and I got an “Unknown error”. I tried drag&drop or the file upload dialog with 2 different browsers (Firefox and Edge Chromium), but no luck. I am able to create new folders and new text documents, just not upload new files. I am able to log in with an ftp program and upload a file in the folder where I want it, but then it won’t show in the NC interface. I don’t know why Nextcloud is giving me so much trouble lately. :frowning:

Yeah, it was working fine after all, but now again it is not allowing to upload files. The desktop client (arch) prints 500 Internal Server Error and the web client prints An uknown error has ocurred. Curiously, when I resync the desktop client, it prints that everything is fine but the files aren’t being uploaded.

Screenshot_2021-01-22 credito3 - Archivos - Perro Tuerto

Captura de pantalla de 2021-01-22 13-03-21

I think I will switch to FileRun, this is just not working for me.

Oh, probably we will have to use other software too. We just wanted to share and host file with the lowest resources as possible. Thanks for the recommendation.

Hello,

i recently had big problem with dreamhost too and my nextclouds

I have a ‘simple’ hosting account.

Finely after two weeks hard working, the solution founded is to disabled “extra web security” from panel domain name management


I don’t know if it is really your problem but with dreamhost you must do this.

Hope this help