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

System external storage mounts as shares instead #11182

Closed
PVince81 opened this issue Sep 19, 2014 · 8 comments
Closed

System external storage mounts as shares instead #11182

PVince81 opened this issue Sep 19, 2014 · 8 comments

Comments

@PVince81
Copy link
Contributor

PVince81 commented Sep 19, 2014

There is currently a lot of code to manage users and groups inside the external storage app.
Furthermore, apps like encryption need special handling to find out who the users are (see #11180 and #11181)

One idea would be to get rid of the user/group part of system wide mount points.

Assigning such mount points to users would work over some kind of virtual user account "sysmountpoints" where the mount points are actually mounted as personal storage.

Then, every mount point is automatically shared with the users who should have access to it.
The advantage of this is that this would reuse the sharing code, hooks/events instead of trying to redo the same for external storage + encryption.

Example file structure for the virtual user "sysmountpoints":
/mounts/sftp1 shared with "user1" and "group1"
/mounts/smb1 shared with "group2"

Changing user assignation over the external storage UI would internally trigger the sharing functions as if the "sysmountpoints" user had changed the shares.

What do you think ?

@schiesbn @karlitschek

@PVince81
Copy link
Contributor Author

CC @MTRichards @craigpg

@MTRichards
Copy link
Contributor

@karlitschek Curious your thoughts about this.

@PVince81
Copy link
Contributor Author

CC @icewind1991 for further input

@icewind1991
Copy link
Contributor

The other way around seems like a better approach to me, store shares in the same way as external storages, since oc7 that's pretty much what they are

@karlitschek
Copy link
Contributor

Hmm. my gut-feeling tells me that we should only refactor this if we get a real benefit out of this like for example massive performance improvements and significant features.

@PVince81
Copy link
Contributor Author

We can reconsider this whenever we see the benefit.
At the moment I wouldn't want to introduce this before the ext storage app is properly cleant up as per #11261

But let's leave this open to gather ideas. Playing with ideas is always good.

@PVince81
Copy link
Contributor Author

This is not about performance, but about maintainability.

So far we noticed again that because of system-wide external storage mount points, we need special code to handle such cases in the encryption app, and soon in the high-level file locking too.

If this was going through regular sharing, then the sharing code path would take care of it in a generic way and not require any custom code.

In fact, this can already be achieved now through other means:

  1. Admin mounts SFTP storage as personal mount to "/sftp"
  2. Admin shares "/sftp" with "group1", "group2", "user1", "user2"

This ticket is mostly about rewiring the system-wide mount points UI to internally use such approach.

@schiessle
Copy link
Contributor

I agree with @PVince81 also versions and trash bin needs special code to handle this use cases correctly. For example at the moment versions are created for each user independently, so there is no common versions history. To have a common version history we would need to implement a special handling similar to what we implemented for the encryption keys. Same goes for the trashbin.

Implementing system wide mount points as shares from a virtual users would solve this issues without writing and maintaining any extra line of code. I think it would be also more transparent for app developers because if it is handled as shares they don't need to think about any special treatment.

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

7 participants