Page 1 of 1
Save Covers / Directory-Tomcat Permissions

Posted:
Sun Jun 10, 2007 2:37 pm
by kulo
Hi! I've a problem when i trying to save albums covers.
I've a Linux/Gentoo, and the directory where i store the mp3 files have the security SOMEUSER/USERS. But tomcat server use tomcat/tomcat for what i read in the documentation.
1) Is there another way, that i can save the covers from album not changing the user in tomcat (tomcat/tomcat) to SOMEUSER/USERS? or change the permision of all files and dirs to tomcat/tomcat?
2) If i change the user in tomcat, the server will not be insecure? (the user (SOMEUSER/USERS) have administratives privilegies)
Thanks! Great Soft!!!
kulo

Posted:
Tue Jun 12, 2007 6:57 pm
by Inge
as root, run the command
- Code: Select all
chown -R tomcat:tomcat /var/subsonic/thumbs
change
user:group to the user running tomcat, and
/var/subsonic/thumbs to the directory in question (/var/subsonic/thumbs is where Subsonic by default stores its album cover copies).
Tip:
chown --help for explanation

Posted:
Wed Jun 13, 2007 7:12 pm
by kulo
The permissions in /var/subsonic/thumbs are tomcat/tomcat and idem in tomcat server. (Just like you said)
Example of a the error when i trying to save a cover:
----
Subsonic encountered an internal error. You can report this error in the Subsonic Forum. Please include the information below.
Exception java.io.FileNotFoundException
Message /mnt/mp3/Inxs/(2005) Switch/folder.jpg (Permission denied)
Java version Sun Microsystems Inc. 1.5.0_08
Operating system Linux 2.6.17-gentoo-r4
Server Apache Tomcat/5.5
Memory Used 24 of 47 MB
Stack trace java.io.FileNotFoundException: /mnt/mp3/Inxs/(2005) Switch/folder.jpg (Permission denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.(FileOutputStream.java:179) at java.io.FileOutputStream.(FileOutputStream.java:131) at net.sourceforge.subsonic.controller.ChangeCoverArtController.saveCoverArt(ChangeCoverArtController.java:106) at net.sourceforge.subsonic.controller.ChangeCoverArtController.handleRequestInternal(ChangeCoverArtController.java:38) at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153) at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:755) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:106) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:229) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at net.sourceforge.subsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:25) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at net.sourceforge.subsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at net.sourceforge.subsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) at java.lang.Thread.run(Thread.java:595)
---
Thanks!

Posted:
Tue Oct 02, 2007 2:31 am
by 3130000a
It is trying to save the album art as:
/mnt/mp3/Inxs/(2005) Switch/folder.jpg

Posted:
Wed Dec 24, 2008 3:57 pm
by ProBlazer
3130000a wrote:It is trying to save the album art as:
/mnt/mp3/Inxs/(2005) Switch/folder.jpg
I'm seeing the same thing on my server. I looked in the /var/subsonic/thumbs directory and it looks like some files are being saved there and others are being saved in the actual directory of the album the art is for.
The only pattern I can see so far is that the art I grab manually seems to be saved inthe albums directory and the art that manages to be grabbed automatically gets put in the subsonic\thumbs directory.

Posted:
Thu Dec 25, 2008 6:02 am
by sindre_mehus
The full-resolution images are saved as folder.jpg in the album directory. The "thumbs" directory is just a cache of scaled-down versions of the same graphics. It's there for performance reasons only.
Cheers,
Sindre

Posted:
Sun Jan 25, 2009 10:54 pm
by kulo
I wrote a feature request for this problem, I don't know if this is posible in tomcat.
http://forum.subsonic.org/forum/viewtopic.php?t=1510