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

Zip files extracted to external storage are not showing up in OwnCloud Front End. #41268

Open
lukaszkaluznybrag opened this issue Jun 18, 2024 · 5 comments

Comments

@lukaszkaluznybrag
Copy link

Steps to reproduce

  1. Mount external storage (in my case it is just path for the folder, e.g. /owncloud/storage)
  2. Install Extract App
  3. Upload any zip file to mounted external storage
  4. Extract zip file using web interface
  5. Files has been extracted without errors. I can find extracted files on the server but they are not showing up on the Owncloud web interface (we are not using app, so I cannot to check from the app perspective)
  6. From the server (e.g. SSH session) create any file in the same folder than you extracted files.
  7. New files/folders are showing up.

Expected behaviour

Files/folders are showing up immediately after extracted, no matter if it is Owncloud storage or external storage.

Actual behaviour

It looks like files/folders extracted on external storage are not synchronized until any changes will be made directly on the external storage. I had and I still have set "Check for changes: Once every direct access".
What I tried already:

  • add / modify files in the same external storage folder using Owncloud web interface - no changes, files still not showing up
  • add file in the same folder using SSH session - files showed up
  • modify files in the same folder using SSH session - no changes, files still not showing up
  • extract files in Owncloud storage - files shows immediately
  • wait few days to sync - no changes, files still not showing up
  • tried to find any related logs - no error / warning logs related with this issue are generated during the issue.

Server configuration

Operating system: RedHat 8, but we are hosting Owncloud using docker image: owncloud/server:10.14

Web server: as in owncloud/server:10.14

Database: as in owncloud/server:10.14

PHP version: as in owncloud/server:10.14

ownCloud version: 10.14

Updated from an older ownCloud or fresh install: Updated from 10.13

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above): ?

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

No errors have been found.

The content of config/config.php:

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: ActiveDirectory

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser: Latest Edge / Chrome

Operating system: Windows 10 / Windows 11

Logs

Web server error log

Insert your webserver log here

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
@DeepDiver1975
Copy link
Member

4. Extract zip file using web interface

This is done with https://marketplace.owncloud.com/apps/extract I assume ....

@lukaszkaluznybrag
Copy link
Author

@DeepDiver1975, yes. I forgot to add link for the app. It works on the local storage and does not work on the external storage, I guess that the core issue may be with the synchronizing external storage data with the Owncloud, so I decided to create issue here.

@DeepDiver1975
Copy link
Member

I had a quick look at the app code and I suspect an issue in the file scan logic which happens in https://github.com/prsnbrg/NextcloudExtract/blob/f1d962888a24e02ab6f47cc0aa5e02806b3b9dc9/lib/Controller/ExtractionController.php#L88

@prsnbrg any idea on what might go wrong? THX a lot

@prsnbrg
Copy link
Contributor

prsnbrg commented Jun 18, 2024

I only have limited time at the moment. Nevertheless, a quick look at the problem.

I have tested the current app version with the external storage SFTP with a localhost connection and everything worked without any problems.

I also activated the local external storage in the config and configured it. The app also works here without any problems. The owner of the local directory is www-data:www-data (Ubuntu 22.04).

I think the problem is the Docker container.
Firstly I thought that the move function for external storages in line ExtractionController.php#L101 is the problem, but the move works corrently - but ownCloud didn't recognize the changes.
An idea for a workaround is to add the following directly after line 101. @lukaszkaluznybrag can you test this?
$scanner = new \OC\Files\Utils\Scanner($this->userId, \OC::$server->getDatabaseConnection(), \OC::$server->getLogger()); $scanner->scan($this->userFolder->getFullPath($NCDestination));

@DeepDiver1975 do you have ideas why ownCloud didn't recognize the changes?
In the next weeks I will do more tests with the docker image.

@DeepDiver1975
Copy link
Member

@DeepDiver1975 do you have ideas why ownCloud didn't recognize the changes?

No idea out of the box .... I would require to do some debugging. But it is an interesting finding that this seems to be docker related. THX @prsnbrg

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

No branches or pull requests

3 participants