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


  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
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

Cloudron Forum

Apps | Demo | Docs | Install

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

Scheduled Pinned Locked Moved Solved Ampache
25 Posts 4 Posters 2.1k Views
    • 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.
  • necrevistonnezrN Offline
    necrevistonnezrN Offline
    necrevistonnezr
    wrote on last edited by
    #1

    I feel stupid, but anyway, I'll ask:

    Under "Resources", I configured Ampache to use a custom storage path: /media/SG2TB/Ampache. I created a folder Music under /media/SG2TB/Ampache.

    Now, when I want to add a catalogue as a local resournce in Ampache, no matter if I enter /media/SG2TB/Ampache/Music, /Music or Music, Ampache tells me the path does not exist...?

    necrevistonnezrN girishG 2 Replies Last reply
    0
  • necrevistonnezrN Offline
    necrevistonnezrN Offline
    necrevistonnezr
    replied to necrevistonnezr on last edited by
    #2

    Permissions:

    drwxrwxrwx  8 kdj      users    4,0K Nov  9 11:02 .
    drwxrwxrwx 13 kdj      users     16K Nov  9 10:59 ..
    drwxrwxrwx  2 kdj      users    4,0K Nov  9 08:47 channel
    drwxrwxrwx  2 kdj      users    4,0K Nov  9 11:01 config
    drwxrwxrwx  2 www-data www-data 4,0K Nov  9 11:02 Music
    -rwxrwxrwx  1 kdj      users     109 Nov  9 08:47 php.ini
    drwxrwxrwx  2 kdj      users    4,0K Nov  9 08:47 play
    drwxrwxrwx  2 kdj      users    4,0K Nov  9 08:47 rest
    drwxrwxrwx  2 kdj      users    4,0K Nov  9 11:01 themes
    

    (I tried with kdj:users as well)

    1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to necrevistonnezr on last edited by
    #3

    @necrevistonnezr I think this will be /app/data/Music. Essentially, whatever you provide as the appdata directory will be mounted into the /app/data of the app.

    necrevistonnezrN 1 Reply Last reply
    1
  • necrevistonnezrN Offline
    necrevistonnezrN Offline
    necrevistonnezr
    replied to girish on last edited by
    #4

    @girish Thanks - that was not super obvious and should maybe go into the docs... 🙂

    girishG 1 Reply Last reply
    1
  • girishG Offline
    girishG Offline
    girish Staff
    replied to necrevistonnezr on last edited by
    #5

    @necrevistonnezr Indeed. Very few apps require "paths" inside the filesystem though. But let me look into adding some text in the UI.

    1 Reply Last reply
    2
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    wrote on last edited by
    #6

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

    /app/data/Music

    This is marked as solved, but I've just:

    1. installed Ampache
    2. mounted my Music volume to it

    But now I'm at a loss as to what I need to do next in order to get Ampache to see and use my Music volume (host path /mnt/storage/Music ) ?

    I use Cloudron with Gandi & Hetzner

    girishG 1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to jdaviescoates on last edited by girish
    #7

    @jdaviescoates In the admin UI, add catalog. Set catalog type to local and the path will be /media/<name-of-your-cloudron-volume> (so looks like /media/Music in your case)

    9ed9ec9c-f05d-4e7c-8d8d-1c6fb3bfe6ae-image.png

    jdaviescoatesJ 1 Reply Last reply
    1
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to girish on last edited by
    #8

    @girish great, thanks, will try that in a bit...

    I use Cloudron with Gandi & Hetzner

    jdaviescoatesJ 1 Reply Last reply
    0
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to jdaviescoates on last edited by
    #9

    Hmz, I just tried that but I keep getting:

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

    @rmdes I think you got volumes working with this, right? How did you do it?

    I use Cloudron with Gandi & Hetzner

    girishG 1 Reply Last reply
    0
  • girishG Offline
    girishG Offline
    girish Staff
    replied to jdaviescoates on last edited by
    #10

    @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 1 Reply Last reply
    0
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to girish 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
  • girishG Offline
    girishG Offline
    girish Staff
    replied to jdaviescoates on last edited by
    #12

    @jdaviescoates Try changing the permissions to chmod -R 777

    jdaviescoatesJ 1 Reply Last reply
    0
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to girish 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
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to girish 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
  • girishG Offline
    girishG Offline
    girish Staff
    replied to jdaviescoates 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
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to girish 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
  • girishG Offline
    girishG Offline
    girish Staff
    replied to jdaviescoates 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
  • jdaviescoatesJ Offline
    jdaviescoatesJ Offline
    jdaviescoates
    replied to girish 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
  • girishG Offline
    girishG Offline
    girish Staff
    replied to jdaviescoates 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

  • Login

  • Don't have an account? Register

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

  • Don't have an account? Register

  • Login or register to search.