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 share files with another user using 'owncloud' storage driver #2969

Closed
rpocklin opened this issue Jan 17, 2022 · 4 comments
Closed

Cannot share files with another user using 'owncloud' storage driver #2969

rpocklin opened this issue Jan 17, 2022 · 4 comments
Labels

Comments

@rpocklin
Copy link
Contributor

rpocklin commented Jan 17, 2022

Describe the bug

Basic sharing fails on the published docker images for ocis.

Steps to reproduce

Steps to reproduce the behavior:

  1. Run the following:
OCIS_DOCKER_TAG=owncloud/ocis:1.16.0
DATA_DIR=/tmp/ocis
docker run --rm -ti -p 9200:9200 --env-file ./.env -v $DATA_DIR:/var/lib/ocis $OCIS_DOCKER_TAG

where the contents of .env is:

STORAGE_USERS_DRIVER=owncloud
STORAGE_HOME_DRIVER=owncloud
OCIS_LOG_LEVEL=warn
OCIS_INSECURE=true
PROXY_ENABLE_BASIC_AUTH=true
  1. Login as admin:admin via https://localhost:9200 in Chrome.
  2. Upload a small file (anything).
  3. Attempt to share with demo user marie.
    image

Expected behavior

Expected to work - it works fine if both references to the owncloud storage driver are not specified in the .env file, suggesting either ocis is the default storage driver, or something else (which i'm unsure about also). If either STORAGE_USERS_DRIVER or STORAGE_HOME_DRIVER are defined, it the sharing fails.

Actual behavior

Error screen appears.

Error logs from ocis docker instance:

{"level":"error","service":"storage","pkg":"rgrpc","error":"ocfs: error resolving reference: error: not found: 53148608-0709-4f3a-b247-ff1e89f487bd","time":"2022-01-17T04:49:21Z","caller":"/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/services/storageprovider/storageprovider.go:1052","message":"error setting grants"}
{"level":"error","service":"storage","pkg":"rgrpc","error":"gateway: grpc failed with code CODE_INTERNAL","time":"2022-01-17T04:49:21Z","caller":"/go/pkg/mod/github.com/cs3org/[email protected]/internal/grpc/services/gateway/usershareprovider.go:574","message":"error committing share to storage grant"}

Error screenshot:
image

Occurs with v1.13.0, v1.15.0 and v1.16.0 of the oCIS docker images.

Setup

Running on Windows / WSL2 with Docker 4.2.0 (Ubuntu shell)

Additional context

I will do testing shortly on Mac/OSX to see if the host environment affects this behaviour.
I have tried clearing the /tmp/ocis folder and re-creating. It removes the previously uploaded files but does not fix the issue.

@wkloucek
Copy link
Contributor

wkloucek commented Feb 1, 2022

I talked to the team and unfortunately this driver is no longer maintained because it was superseded by the ownCloudSQL driver (which uses the ownCloud 10 filesystem layout and the ownCloud 10 database). You also can find the setup in this example:

# ownCloud storage driver
STORAGE_USERS_DRIVER: owncloudsql
STORAGE_METADATA_DRIVER: ocis # keep metadata on ocis storage since this are only small files atm
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DATADIR: /mnt/data/files
STORAGE_USERS_DRIVER_OWNCLOUDSQL_UPLOADINFO_DIR: /tmp
STORAGE_USERS_DRIVER_OWNCLOUDSQL_SHARE_FOLDER: "/Shares"
STORAGE_USERS_DRIVER_OWNCLOUDSQL_LAYOUT: "{{.Username}}"
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DBUSERNAME: owncloud
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DBPASSWORD: owncloud
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DBHOST: oc10-db
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DBPORT: 3306
STORAGE_USERS_DRIVER_OWNCLOUDSQL_DBNAME: owncloud
STORAGE_USERS_DRIVER_OWNCLOUDSQL_REDIS_ADDR: redis:6379 # TODO: redis is not yet supported
# ownCloud sharing driver
STORAGE_SHARING_USER_DRIVER: oc10-sql
STORAGE_SHARING_USER_SQL_USERNAME: owncloud
STORAGE_SHARING_USER_SQL_PASSWORD: owncloud
STORAGE_SHARING_USER_SQL_HOST: oc10-db
STORAGE_SHARING_USER_SQL_PORT: 3306
STORAGE_SHARING_USER_SQL_NAME: owncloud

Besides the files, also shares are available accross oCIS and oC10

@rpocklin
Copy link
Contributor Author

rpocklin commented Feb 1, 2022

Okay no worries - could I suggest the driver be deprecated in the code or removed completely?

@wkloucek
Copy link
Contributor

wkloucek commented Feb 1, 2022

Docs already mention it as deprecated, but I'll care for removing all code and references ;-) Thanks for this finding!

image

@rpocklin
Copy link
Contributor Author

rpocklin commented Feb 2, 2022

Docs already mention it as deprecated, but I'll care for removing all code and references ;-) Thanks for this finding!

image

Yes, I noticed they added that quietly a few days after I raised this PR =)

@wkloucek wkloucek closed this as completed Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants