How to share folders with OwnCloud read-only users
Requirements
Onwcloud Plugin activated in Plugins section
Description
This guide is gonna show you how to share your folders that are stored in your NAS storage with OwnCloud users.
Installation
First thing to know is that OwnCloud users are imported from your OMV configuration.
That means that they use your web user (www-data) to access all folders, and by the way, with admin privileges, so be very CAREFUL because if something is deleted in OwnCloud, it is really deleted in your storage !!!
So here is what you have to do :
- Create on your OMV administration panel a usertest within the users group :
- Create a ReadOnly group where you can add your usertest :
- Go to your Shared Folders, choose the folder you want to share and
click on Privileges, there you can tick the Read-Only box for your
ReadOnly group : - Go to your OwncLoud plugin administration and in the Shares tab you can add the folder you want to share :
- Go to your OwnCloud page and add the External Storage Support :
- Then go to the Users page :
- Here you can see all the users imported from your OMV configuration
(you can see that the user usertest goes with the ReadOnly group) : - After that verification go to the Admin page :
- Here you can see all the folders that you added previously in the Shares Tab from the OwnCloud plugin (here's mine) :
- You can add more by clicking on Add Storage and choose Local :
- There you have to fill in the field with the path of your folder on
your storage, here is how you can find it (by connecting to your OMV
with SSH) :Code
Alles anzeigencd /media ls -al drwxr-xr-x 6 root root 4096 janv. 27 19:50 . drwxr-xr-x 24 root root 4096 févr. 3 19:20 .. drwxr-xr-x 14 root root 4096 janv. 27 20:56 517da1a9-99a8-48b7-94ec-e937566a740d drwxrwxrwx 1 root root 24576 janv. 30 21:26 9274996F749956B7 drwxr-xr-x 2 root root 4096 janv. 27 19:32 cdrom lrwxrwxrwx 1 root root 4 janv. 27 19:32 usb -> usb0 drwxr-xr-x 2 root root 4096 janv. 27 19:32 usb0 ls -al 517da1a9-99a8-48b7-94ec-e937566a740d drwxr-xr-x 14 root root 4096 janv. 27 20:56 . drwxr-xr-x 6 root root 4096 janv. 27 19:50 .. drwxrws---+ 46 root users 8192 janv. 18 23:03 AnimeMangas drwxrws---+ 7 root users 4096 nov. 13 2013 Backup drwxrws---+ 11 root users 4096 nov. 13 2013 DessinsAnimés drwxrws---+ 8 root users 4096 nov. 26 19:17 Documents drwxrws---+ 29 root users 8192 janv. 19 21:18 Films drwxrws---+ 23 root users 4096 nov. 26 19:19 Jeux drwxrws---+ 13 root users 4096 févr. 2 20:58 Musique drwxrws---+ 13 www-data www-data 4096 févr. 8 15:36 OwnCloud drwxrws---+ 46 root users 4096 nov. 26 21:57 Photos drwxr-xrwx 3 plex nogroup 20 janv. 27 20:56 plexmediaserver drwxrws---+ 25 root users 4096 mars 23 2014 Séries drwxrws---+ 4 root users 62 mars 11 2013 Vrac
For example you can add the path /media/517da1a9-99a8-48b7-94ec-e937566a740d/Films to add your Films folder.
- Then you have to make it applicable only to the admin group :
- You can also uncheck the following box (as you wish) :
- After that go to your Files, you can see that the admin group have the privilege to delete files :
- Log out from your admin account and log in with your usertest account :
- You can see that there is nothing here :
- Return to your admin account, we now have to share the folder with the ReadOnly group :
- Uncheck all the edition boxes :
- Now log in to your usertest account, you can see that there is not nothing anymore but there is still the Delete Option :
- Try to delete the folder :
You can't !!!So you now have shared folders where your friends can't mess up with your files.
Cheers mates.
Questions / Problems / Discussions
Click here to get to the discussions thread
Version 1.0 // 18/02/2015