[miniGUIDE] How to share folders with OwnCloud read-only users

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [miniGUIDE] How to share folders with OwnCloud read-only users

      How to share folders with OwnCloud read-only users

      Onwcloud Plugin activated in Plugins section

      This guide is gonna show you how to share your folders that are stored in your NAS storage with OwnCloud users.

      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 :
      1. Create on your OMV administration panel a usertest within the users group :
        [Blocked Image: http://s13.postimg.org/fxn72y0hj/image.png]
      2. Create a ReadOnly group where you can add your usertest :
        [Blocked Image: http://s18.postimg.org/ywdkvakvt/image.png]
      3. 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 :
        [Blocked Image: http://s4.postimg.org/f59ug2azx/image.png]
      4. Go to your OwncLoud plugin administration and in the Shares tab you can add the folder you want to share :
        [Blocked Image: http://s30.postimg.org/szdvwj9e9/image.png]
      5. Go to your OwnCloud page and add the External Storage Support :
        [Blocked Image: http://s1.postimg.org/krmdwrvsf/image.png][Blocked Image: http://s21.postimg.org/7tl3frt3b/image.png]
      6. Then go to the Users page :
        [Blocked Image: http://s23.postimg.org/satn8n0jf/image.png]
      7. Here you can see all the users imported from your OMV configuration
        (you can see that the user usertest goes with the ReadOnly group) :
        [Blocked Image: http://s24.postimg.org/b1zonbuok/image.jpg][Blocked Image: http://s24.postimg.org/9a6psfbbn/image.png]
      8. After that verification go to the Admin page :
        [Blocked Image: http://s30.postimg.org/gq8nb3tch/image.png]
      9. Here you can see all the folders that you added previously in the Shares Tab from the OwnCloud plugin (here's mine) :
        [Blocked Image: http://s30.postimg.org/6l5ur62bz/image.png]
      10. You can add more by clicking on Add Storage and choose Local :
        [Blocked Image: http://s9.postimg.org/3y5mf47r3/image.png]
      11. 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) :

        Source Code

        1. cd /media
        2. ls -al
        3. drwxr-xr-x 6 root root 4096 janv. 27 19:50 .
        4. drwxr-xr-x 24 root root 4096 févr. 3 19:20 ..
        5. drwxr-xr-x 14 root root 4096 janv. 27 20:56 517da1a9-99a8-48b7-94ec-e937566a740d
        6. drwxrwxrwx 1 root root 24576 janv. 30 21:26 9274996F749956B7
        7. drwxr-xr-x 2 root root 4096 janv. 27 19:32 cdrom
        8. lrwxrwxrwx 1 root root 4 janv. 27 19:32 usb -> usb0
        9. drwxr-xr-x 2 root root 4096 janv. 27 19:32 usb0
        10. ls -al 517da1a9-99a8-48b7-94ec-e937566a740d
        11. drwxr-xr-x 14 root root 4096 janv. 27 20:56 .
        12. drwxr-xr-x 6 root root 4096 janv. 27 19:50 ..
        13. drwxrws---+ 46 root users 8192 janv. 18 23:03 AnimeMangas
        14. drwxrws---+ 7 root users 4096 nov. 13 2013 Backup
        15. drwxrws---+ 11 root users 4096 nov. 13 2013 DessinsAnimés
        16. drwxrws---+ 8 root users 4096 nov. 26 19:17 Documents
        17. drwxrws---+ 29 root users 8192 janv. 19 21:18 Films
        18. drwxrws---+ 23 root users 4096 nov. 26 19:19 Jeux
        19. drwxrws---+ 13 root users 4096 févr. 2 20:58 Musique
        20. drwxrws---+ 13 www-data www-data 4096 févr. 8 15:36 OwnCloud
        21. drwxrws---+ 46 root users 4096 nov. 26 21:57 Photos
        22. drwxr-xrwx 3 plex nogroup 20 janv. 27 20:56 plexmediaserver
        23. drwxrws---+ 25 root users 4096 mars 23 2014 Séries
        24. drwxrws---+ 4 root users 62 mars 11 2013 Vrac
        Display All

        For example you can add the path /media/517da1a9-99a8-48b7-94ec-e937566a740d/Films to add your Films folder.

      12. Then you have to make it applicable only to the admin group :
        [Blocked Image: http://s11.postimg.org/iswdj6xld/image.png]
      13. You can also uncheck the following box (as you wish) :
        [Blocked Image: http://s18.postimg.org/fr21wspbt/image.png]
      14. After that go to your Files, you can see that the admin group have the privilege to delete files :
        [Blocked Image: http://s14.postimg.org/3n8iv8h9b/image.png]
      15. Log out from your admin account and log in with your usertest account :
        [Blocked Image: http://s14.postimg.org/45hwzorxd/image.png]
      16. You can see that there is nothing here :
        [Blocked Image: http://s14.postimg.org/vdsjc95y9/image.png]
      17. Return to your admin account, we now have to share the folder with the ReadOnly group :
        [Blocked Image: http://s27.postimg.org/twje2p50j/image.png]
      18. Uncheck all the edition boxes :
        [Blocked Image: http://s7.postimg.org/ra8m9v0a3/image.png]
      19. Now log in to your usertest account, you can see that there is not nothing anymore but there is still the Delete Option :
        [Blocked Image: http://s28.postimg.org/rlcp1mb63/image.png]
      20. Try to delete the folder :
        [Blocked Image: http://s22.postimg.org/81chym7s1/image.png]
        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
      - ASROCK FM2A88X-ITX+ (SATAIII (6Gb/s) x6 (for the DATA), mSATA x1 (for the OS) ==> maybe the only afordable motherboard with 6xSATAIII ports)
      - AMD A6 7400K 3.5GHz (overpowerful for NAS but the cheapest for this motherboard)
      - Corsair 2Go DDR3 1333MHz C9 (x2)
      - INTEL GIGABIT CT DESKTOP ADAPTER SINGLE PORT RJ45 PCIE (to avoid backports problems with network controller)
      - COOLER MASTER G450M (80+ bronze)
      - WD Red 2To 64Mo 3.5" SATAIII (6Gb/s) (x4 for the DATA, 2 SATA ports left for future use)
      - 32 Go SSD mSATA KingSpec Half-Size Solid State (for the OS which allows 6 SATA HDDs)
      - Fractal Design Node 304 black (HDD 3.5" x6)
      - RAID 5 xfs
      - OMV 1.12 (Kralizec) - 3.16.0-0.bpo.4-amd64

      The post was edited 1 time, last by subzero79 ().