Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Ampache
  3. Ampache - How to add a catalog / media with custom storage?

Ampache - How to add a catalog / media with custom storage?

Scheduled Pinned Locked Moved Solved Ampache
25 Posts 4 Posters 6.9k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • girishG girish

    @jdaviescoates Can you cd /media/Music when you open web terminal of the app ? (make sure you have the letter casing correct). If that's there, then it's mostly because the data it's not readable by the www-data user?

    jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    wrote on last edited by
    #11

    @girish said in Ampache - How to add a catalog / media with custom storage?:

    @jdaviescoates Can you cd /media/Music when you open web terminal of the app ?

    Yes, I can.

    @girish said in Ampache - How to add a catalog / media with custom storage?:

    If that's there, then it's mostly because the data it's not readable by the www-data user?

    OK, so how to fix that? I assume chmod? At present it's like this:

    drwxrwx--- 2 cloudron cloudron    0 Jan 14 10:12 Music
    

    I use Cloudron with Gandi & Hetzner

    girishG 1 Reply Last reply
    0
    • jdaviescoatesJ jdaviescoates

      @girish said in Ampache - How to add a catalog / media with custom storage?:

      @jdaviescoates Can you cd /media/Music when you open web terminal of the app ?

      Yes, I can.

      @girish said in Ampache - How to add a catalog / media with custom storage?:

      If that's there, then it's mostly because the data it's not readable by the www-data user?

      OK, so how to fix that? I assume chmod? At present it's like this:

      drwxrwx--- 2 cloudron cloudron    0 Jan 14 10:12 Music
      
      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #12

      @jdaviescoates Try changing the permissions to chmod -R 777

      jdaviescoatesJ 1 Reply Last reply
      0
      • girishG girish

        @jdaviescoates Try changing the permissions to chmod -R 777

        jdaviescoatesJ Offline
        jdaviescoatesJ Offline
        jdaviescoates
        wrote on last edited by
        #13

        @girish at first I couldn't do that because I had mounted the Volume as Read only.

        Even after changing that and then doing chmod 777 Music/ (from within the /media/ folder) it doesn't seem to have made any difference. I still get the exact same:

        The folder couldn't be read. Does it exist? /media/Music
        

        I use Cloudron with Gandi & Hetzner

        1 Reply Last reply
        0
        • girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #14

          @jdaviescoates did you try the chmod on the host? (and not inside container)

          jdaviescoatesJ 1 Reply Last reply
          0
          • girishG girish

            @jdaviescoates did you try the chmod on the host? (and not inside container)

            jdaviescoatesJ Offline
            jdaviescoatesJ Offline
            jdaviescoates
            wrote on last edited by
            #15

            @girish said in Ampache - How to add a catalog / media with custom storage?:

            @jdaviescoates did you try the chmod on the host? (and not inside container)

            Ah, no, I did it within the Web Terminal of the App itself.

            I think if I need to actually SSH into my server in order to actually get Volumes to work with Ampache then perhaps I'll just not use Ampache at all!

            I'm also wondering what the security implications of making it 777 are and if that could potentially mean other people could delete files from there without me wanting them to?

            I use Cloudron with Gandi & Hetzner

            girishG 1 Reply Last reply
            0
            • jdaviescoatesJ jdaviescoates

              @girish said in Ampache - How to add a catalog / media with custom storage?:

              @jdaviescoates did you try the chmod on the host? (and not inside container)

              Ah, no, I did it within the Web Terminal of the App itself.

              I think if I need to actually SSH into my server in order to actually get Volumes to work with Ampache then perhaps I'll just not use Ampache at all!

              I'm also wondering what the security implications of making it 777 are and if that could potentially mean other people could delete files from there without me wanting them to?

              girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #16

              @jdaviescoates said in Ampache - How to add a catalog / media with custom storage?:

              I'm also wondering what the security implications of making it 777 are and if that could potentially mean other people could delete files from there without me wanting them to?

              Do other people have access to the server? (i.e can they ssh in?). Do you also require that Cloudron admins should not be able to delete files from the say the Volume -> file manager ?

              jdaviescoatesJ 1 Reply Last reply
              0
              • girishG girish

                @jdaviescoates said in Ampache - How to add a catalog / media with custom storage?:

                I'm also wondering what the security implications of making it 777 are and if that could potentially mean other people could delete files from there without me wanting them to?

                Do other people have access to the server? (i.e can they ssh in?). Do you also require that Cloudron admins should not be able to delete files from the say the Volume -> file manager ?

                jdaviescoatesJ Offline
                jdaviescoatesJ Offline
                jdaviescoates
                wrote on last edited by
                #17

                @girish said in Ampache - How to add a catalog / media with custom storage?:

                Do other people have access to the server? (i.e can they ssh in?).

                No.

                @girish said in Ampache - How to add a catalog / media with custom storage?:

                Do you also require that Cloudron admins should not be able to delete files from the say the Volume -> file manager ?

                At present there are no other admins. But if there were, I'd trust them to not do that.

                I use Cloudron with Gandi & Hetzner

                girishG 1 Reply Last reply
                0
                • jdaviescoatesJ jdaviescoates

                  @girish said in Ampache - How to add a catalog / media with custom storage?:

                  Do other people have access to the server? (i.e can they ssh in?).

                  No.

                  @girish said in Ampache - How to add a catalog / media with custom storage?:

                  Do you also require that Cloudron admins should not be able to delete files from the say the Volume -> file manager ?

                  At present there are no other admins. But if there were, I'd trust them to not do that.

                  girishG Offline
                  girishG Offline
                  girish
                  Staff
                  wrote on last edited by
                  #18

                  @jdaviescoates Ah ok, if there are no admins, there is no danger of chmod 777 and other people being able to delete things.

                  A more "unixy" way is to create a group. Cloudron already creates a group called media. Then, add the www-data (that ampache uses) to that group on the host. Then change ownership of the directory to be media group and have rwx permissions. That should work too.

                  jdaviescoatesJ 1 Reply Last reply
                  0
                  • girishG girish

                    @jdaviescoates Ah ok, if there are no admins, there is no danger of chmod 777 and other people being able to delete things.

                    A more "unixy" way is to create a group. Cloudron already creates a group called media. Then, add the www-data (that ampache uses) to that group on the host. Then change ownership of the directory to be media group and have rwx permissions. That should work too.

                    jdaviescoatesJ Offline
                    jdaviescoatesJ Offline
                    jdaviescoates
                    wrote on last edited by
                    #19

                    @girish this just doesn't feel like the Cloudron "it just works" way 🙂

                    I use Cloudron with Gandi & Hetzner

                    girishG 1 Reply Last reply
                    0
                    • jdaviescoatesJ jdaviescoates

                      @girish this just doesn't feel like the Cloudron "it just works" way 🙂

                      girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #20

                      @jdaviescoates yeah, it's a bit rough.. AFAIK, fixing permissions cannot be done for ext4 mounts without a chmod and I don't know if it's a good idea to do this automagically since it changes the metadata on the external disk. Maybe someone else can chime in.

                      Is yours a ext4 volume or something else? Because others like CIFS support umask flag when mounting. Maybe that's an option too.

                      jdaviescoatesJ 1 Reply Last reply
                      0
                      • girishG girish

                        @jdaviescoates yeah, it's a bit rough.. AFAIK, fixing permissions cannot be done for ext4 mounts without a chmod and I don't know if it's a good idea to do this automagically since it changes the metadata on the external disk. Maybe someone else can chime in.

                        Is yours a ext4 volume or something else? Because others like CIFS support umask flag when mounting. Maybe that's an option too.

                        jdaviescoatesJ Offline
                        jdaviescoatesJ Offline
                        jdaviescoates
                        wrote on last edited by
                        #21

                        @girish said in Ampache - How to add a catalog / media with custom storage?:

                        CIFS support umask flag when mounting

                        Yeah it's CIFS

                        I use Cloudron with Gandi & Hetzner

                        girishG 1 Reply Last reply
                        0
                        • jdaviescoatesJ jdaviescoates

                          @girish said in Ampache - How to add a catalog / media with custom storage?:

                          CIFS support umask flag when mounting

                          Yeah it's CIFS

                          girishG Offline
                          girishG Offline
                          girish
                          Staff
                          wrote on last edited by
                          #22

                          @jdaviescoates Maybe you can try file_mode and dir_mode flag in the /etc/fstab. See https://askubuntu.com/questions/313093/how-do-i-mount-a-cifs-share-via-fstab-and-give-full-rw-to-guest .

                          I guess this is part of the complexity in implementing this 🙂 Worth automating!

                          1 Reply Last reply
                          1
                          • C Offline
                            C Offline
                            cocconat
                            wrote on last edited by
                            #23

                            @girish

                            Hi,

                            I have a similar problem of @necrevistonnezr here.

                            I installed Ampache with the docker, although I am not familiar with the docker infrastructure, nor with the issue that can arise with it.

                            My docker is in /home/cocconat/ampache/

                            Once I installed the service all run smooth, and I can add the two test songs in the /home/cocconat/ampache/data/media/

                            All amazing.

                            Now I would like to add to the Catalog my entire music library. It lives in an external storage mounted in /home/cocconat/data/Music

                            I tried to make a link to the folder with

                            sudo ln -s /home/cocconat/Music ampache/data/media/music
                            

                            but the catalogue does not see the linked folder,

                            I also tried to add a custom path in the Admin -> Add Catalog, I chose Local catalog and use the abs path of my folder /home/cocconat/data/Music or the relative path ../../Music which seems a bit silly ehehe.

                            Anyway, no way to find this folder.
                            My storage is an exfat mounted with fstab options: defaults,uid=1000,gid=1000,umask=022 0 1
                            which should be fine if I do not want to upload/change the files.

                            Is this a problem? shall I add www-data to my group?

                            And how am I supposed to add the folder? via the link or somehow else?

                            Thanks,
                            cocconat

                            girishG 1 Reply Last reply
                            1
                            • C cocconat

                              @girish

                              Hi,

                              I have a similar problem of @necrevistonnezr here.

                              I installed Ampache with the docker, although I am not familiar with the docker infrastructure, nor with the issue that can arise with it.

                              My docker is in /home/cocconat/ampache/

                              Once I installed the service all run smooth, and I can add the two test songs in the /home/cocconat/ampache/data/media/

                              All amazing.

                              Now I would like to add to the Catalog my entire music library. It lives in an external storage mounted in /home/cocconat/data/Music

                              I tried to make a link to the folder with

                              sudo ln -s /home/cocconat/Music ampache/data/media/music
                              

                              but the catalogue does not see the linked folder,

                              I also tried to add a custom path in the Admin -> Add Catalog, I chose Local catalog and use the abs path of my folder /home/cocconat/data/Music or the relative path ../../Music which seems a bit silly ehehe.

                              Anyway, no way to find this folder.
                              My storage is an exfat mounted with fstab options: defaults,uid=1000,gid=1000,umask=022 0 1
                              which should be fine if I do not want to upload/change the files.

                              Is this a problem? shall I add www-data to my group?

                              And how am I supposed to add the folder? via the link or somehow else?

                              Thanks,
                              cocconat

                              girishG Offline
                              girishG Offline
                              girish
                              Staff
                              wrote on last edited by
                              #24

                              @cocconat this is the Cloudron forum for the Ampache package, so things which are being discussed are Cloudron related or specific to Ampache package. They may or may not work for docker deployments.

                              You might want to take this up upstream here - https://github.com/ampache/ampache/discussions

                              C 1 Reply Last reply
                              1
                              • girishG girish

                                @cocconat this is the Cloudron forum for the Ampache package, so things which are being discussed are Cloudron related or specific to Ampache package. They may or may not work for docker deployments.

                                You might want to take this up upstream here - https://github.com/ampache/ampache/discussions

                                C Offline
                                C Offline
                                cocconat
                                wrote on last edited by
                                #25

                                @girish Thanks 🙂

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search