[Owncloud] Accessing files outside the users home folder

Frank Karlitschek karlitschek at kde.org
Fri Jan 20 12:20:48 UTC 2012


On 20.01.2012, at 01:06, Robin Appelman wrote:

> Hi,
> 
> Trowing some idea out here for whoever is interested and/or wants to provide 
> some ideas or feedback.
> 
> Currently the only "correct" way of accessing any file of a user, oc_filesystem, 
> is limited to files within the users home folder (/username/files in the 
> complete virtual filesytem).
> While this is fine for most uses, there are plenty of valid cases where an app 
> needs to access files outside the home folder. Sharing needs to access files 
> owned by other users, gallary needs to store thumbnails of photos and 
> galleries and media might want to store album covers somewhere.
> 
> All apps that currently need to do something like this currently have their 
> own implementation that bypasses oc_filesystem partly of completly, while that 
> may work for now, bypassing oc_filesystem would, in the future, mean not having 
> things like encryption, metadata storage or not having the file at all due to 
> it being mounted from a remote source.
> 
> My idea for providing a proper way to access files outside the users home 
> folder without making oc_filesystem harder to use for 90% of the use cases is 
> to add a new class oc_filesystemview, which can create a "view" into ownCloud's 
> virtual file system simular to oc_filesystem, only without having to be locked 
> into the users home folder.
> 
> Every view can have it's own chroot, giving it access to a part of the 
> filesystem and will provide the same functionality oc_filesystem provides.
> The sharing app could create a new view on /otheruser/files to gain access to 
> the files and application that need to store files outside the users view can 
> create a view on /username/appid.
> 
> To retain compatibility with the current way of using oc_filesystem, 
> oc_filesystem will provide a static default view on /username/files with zero 
> api changes for apps using oc_filesystem the "normal" way.
> 
> Looking foreward to ideas/feedback on this increasingly relevant topic.
> 


Very good suggestion. We definitely need a solution when we do versioning/encryption
and mounting of external storage.

I think you proposal makes a lot of sense.

Frank



Frank Karlitschek
karlitschek at kde.org





More information about the Owncloud mailing list