Page 1 of 1

[Solved] Upload Permission errors on non-root subsonic user

PostPosted: Mon Mar 14, 2011 4:19 am
by jaquense
Ok, I am sure there is a simple fix here and im just not seeing it...

I'm getting a Permission denied: /var/music/subsonic/unsorted_music/uploaded/blah.mp3 error after switching my subsonic server (stand alone linux) from a root user to it's own user/group (subsonic/subsonic)

I had assumed (and still do...) that it was a permission error at the upload location which was set to my main user. I have since changed the /var/music folder to the subsonic group (chown -R :subsonic /var/music) figuring that would fix it but to no avail. Looking at the permissions everything looks good as far as I can tell, but I'm still new to Linux and the strict permissioning paradigm is still new to me so i could be off...

Thoughts?

SOLUTION

Ok after all my thoughts about it being Linux permissions related it was actually a Subsonic Limitation. My "upload" directory was not located in one of my music folders, which is apparently a safety feature, or rather a security feature built into SS. SO when I added said folder into my subsonic music folders I got it to work.

I understand the limitation and it's reason since you are exposing the upload path to the user you must at least impose some limits so they don't go trying to upload stuff elsewhere on my computer. BUT wouldn't the better solution be to obscure the path from Users and run SS on a "jetty" user for standalone Linux installs?

PostPosted: Tue Mar 15, 2011 2:27 pm
by 3R3
Try to change user AND group ownage on your upload/music path like so:
Code: Select all
chown -R user:group /your/path/

And of course make sure the user that SS logs in as/is executed from is the same as the owner of the folder you're trying to upload to.

PostPosted: Tue Mar 15, 2011 6:50 pm
by Skidd
You also need to make sure the group has write privileges on your directory.

Code: Select all
chmod -R ug+rw /var/music/subsonic/unsorted_music/uploaded/


That will give the directory both read and write privs to the users and groups of that path.

But, what you might do is set that var folder to be owned by the subsonic user, and then grant any users who need rw in that folder access to the group.

chown -R subsonic:subsonic /var/music/subsonic

Then, if you need to grant any local users access to that folder, just add them to the subsonic system group

PostPosted: Fri Apr 01, 2011 8:04 pm
by jaquense
Ok I'm back at this issue which I THOUGHT I had fixed.

I now have a more or less vanilla subsonic server running on an Apache2 Tomcat6 combo

I have set the permissions to the /var/music/unsorted_music/uploaded folder to full rwx on both the owner and group, them being tomcat6:tomcat6

I have tried combos of permissions and user:groups but no dice!

This is weird, considering I am having no problems with permissions on anything else server related

PostPosted: Mon Apr 04, 2011 6:37 pm
by jaquense
shameless bump!