Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot display site when pages stored on an external mount local storage #37

Closed
rkilchmn opened this issue Nov 14, 2017 · 9 comments
Closed

Comments

@rkilchmn
Copy link

Hi,

I was trying to use Cms Pico App with nextcloud 12. Since i have encryption enabled i had added an un-encrypyed external mount point for local storage. I can edit the .md file on the external storage and can see it is not encrpted.
external storage

Problem I found:

  1. An error is displayed that encryption is enabled which is not true for the external local storage location. The check for encrption need to be specific to the mount point if possible. I guess it is very common to have encryption for user files activated.
  2. I commented out the encryption check but then get another error on the page "Webpage cannot be rendered"

I wouldlike to debug/trace but dont know a good way to output the content of the exception that is thrown in the code

@PhrozenByte
Copy link
Collaborator

PhrozenByte commented Aug 23, 2019

Pico CMS for Nextcloud v1.0.0 is arriving and I'm currently working through some old issues that can be resolved before releasing the app's first stable release. See help.nextcloud.com for more info.

Storing websites on external storages isn't possible due to technical limitations (if you wanna learn more about the technical limitations, see 41f6228). However, the term "external storage" doesn't really match what it really is - so, for example, a server-encrypted Nextcloud is also stored on a "external storage", even though the data is indeed stored on the local disk. It's about how the data is being accessed - either directly or via an abstraction layer. Pico CMS for Nextcloud requires direct file access, thus we'll show a nice error message to inform the user about this issue.

Anyways, you're trying to use a "Local" external storage. A "Local" external storage allows direct file access and thus is no "external storage" in a technical manner. Starting with Pico CMS for Nextcloud v1.0.0 you can indeed use "Local" external storages. However, you won't be able to enable the current beta because of your server-encrypted Nextcloud... However, I'll remove this limitation with the second beta. Your idea of using a "Local" external storage to circumvent the encryption is amazing, I didn't think of this as a solution to support server-encrypted Nextclouds.

Thank you for your help! 👍

Related to #2 and #52

@rkilchmn
Copy link
Author

Awsome! Will test it out soon

@rkilchmn
Copy link
Author

rkilchmn commented Nov 20, 2019

I tested with 1.0.0 beta 2 on NC 17.0.1 and get an error when selecting the path using a "local" external mount
"The website's path is stored on a non-local storage."

patherror

local_external_storage

@PhrozenByte
Copy link
Collaborator

Hmm... Weird. I was testing this before and it worked, but now it indeed doesn't work anymore. After checking the code I'm asking myself why it ever worked. Since I had some issues enabling encryption in my Development Nextcloud, I'd assume that encryption never really worked while testing this feature... 😒

Anyway, the issue is that enabling encryption also affects external storages. The "Enable encryption" option of an external storage just tells the storage whether new files should be encrypted, all accesses still use said abstraction layer, making it impossible for Pico CMS for Nextcloud to use this storage. However, since some storages don't support encryption (like the Nextcloud external storage), we can utilize this by registering our own external storage backend that claims that it doesn't support encryption.

Unfortunately I'm currently unable to register said storage backend from the Pico CMS for Nextcloud app (it's just a few lines of code...). The weird thing is: Adding the exact same code to the files_external app works just fine. No idea what is going on there... 😕 I'll investigate further and possibly open a bug report for nextcloud/server. Since I was planning to release Pico CMS for Nextcloud v1.0.0 this sunday, I don't want this to block the release - it's about time. However, this remains one of the top priorities for Pico CMS for Nextcloud.

@PhrozenByte
Copy link
Collaborator

Finally got it working, will be in the upcoming v1.0.2

@rkilchmn
Copy link
Author

rkilchmn commented Dec 4, 2019

just testing with latest master. Should i be able to select local storage mount point now? Or is there a different approach now?

@PhrozenByte
Copy link
Collaborator

You must create and use a "Local (unecrypted)" local storage.

@rkilchmn
Copy link
Author

rkilchmn commented Dec 5, 2019

Thanks - that did the trick. It is working now!!! Awsome job

@livier
Copy link

livier commented Jul 27, 2020

Found the same problen again with pico 1.0.8
I have a folder /var/nextcloud-data out of /var/www/nextcloud.
Is it the source of misunderstanding
"The website's path is stored on a non-local storage."
And what sould I do ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants