Block Storage Permissions Issue

October 8, 2016 2.6k views
Ubuntu 16.04 Block Storage

I’ve set up a block storage volume (/mnt/media) and can access it via SSH and SFTP. However, I can not add files to the volume from my app as it’s owned by root; I receive a permission denied error.

How can I update the permission so that the site owner can store and view files in /mnt/media?

1 Answer

I did this

sudo chown forge:forge /mnt/media

and, of course, it works. I just wanted to check if that is the right thing to do on a block storage volume.

  • When I tried this, I get…
    chown: invalid user: ‘forge:forge’

    Whenever I try to use my rails app to upload an image to the block storage, I get this error message:

    Errno::EACCES (Permission denied @ dirsmkdir - /mnt/volume-sgp1-01)

    I think it’s a similar situation as you have. However, I’m not sure why your solution isn’t working…

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!