Upload not working

Post your Server Bug Report
MindZoe
Posts: 4
Joined: 05 Jan 2017, 14:51
Has thanked: 0
Been thanked: 3 times

Upload not working

Unread post by MindZoe »

On 6.2.9080 upload is not working. Even though I change the "Upload files to" in Settings, General to my prober upload folder, when trying to upload Madsonic states the upload folder to "/var/media/incoming/Upload-xxxx" and not the correct folder as in settings.
These users thanked the author MindZoe for the post:
Madsonic
Rating: 7.69%
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Upload not working

Unread post by Madsonic »

Hi there,

This is a standard behavior that for each user a separated upload folder is created.

best regards
User avatar
troycarpenter
Posts: 138
Joined: 03 Dec 2013, 19:16
Has thanked: 28 times
Been thanked: 50 times

Re: Upload not working

Unread post by troycarpenter »

First thing is that in the settings, I've specified the upload folder to be:
/media/madsonic/incoming

However, the upload is going to:
/var/media/incoming

It would seem to me that the server should be creating the user directory (Upload-<username>) in the directory specified in the settings.

Secondly, I still get a permission error when uploading files, even though the directory is owned by root (same as the process running madsonic), and the permissions are 777.

Code: Select all

root@flawless:/var/media/incoming# ls -alh
total 12K
drwxrwxrwx+ 3 root root 4.0K Mar 23  2016 .
drwxrwxrwx+ 3 root root 4.0K Mar 16  2016 ..
drwxrwxrwx+ 2 root root 4.0K Mar 23  2016 Upload-troy
root@flawless:/var/media/incoming# getfacl Upload-troy/
# file: Upload-troy/
# owner: root
# group: root
user::rwx
group::rwx
other::rwx
default:user::rwx
default:group::rwx
default:other::rwx
I still get an error when the upload is finished:

Code: Select all

[2017-01-05 14:28:24,417] WARN UploadController - Uploading failed.
java.lang.Exception: Permission denied: /var/media/incoming/Upload-troy/John Lee Hooker - Boom Boom.mp3
        at org.madsonic.controller.UploadController.handleRequestInternal(UploadController.java:108)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
        at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1507)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
        at org.madsonic.filter.RequestEncodingFilter.doFilter(RequestEncodingFilter.java:43)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
        at org.madsonic.filter.ParameterDecodingFilter.doFilter(ParameterDecodingFilter.java:54)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1495)
        at org.madsonic.filter.BootstrapVerificationFilter.doFilter(BootstrapVerificationFilter.java:58)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1487)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:427)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
        at org.eclipse.jetty.server.Server.handle(Server.java:370)
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
        at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:984)
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1045)
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:861)
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
        at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)
        at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)
        at org.eclipse.jetty.server.ssl.SslSocketConnector$SslConnectorEndPoint.run(SslSocketConnector.java:670)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
        at java.lang.Thread.run(Thread.java:745)
I have tried many different ways to get this to work, but it just isn't happening.
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Upload not working

Unread post by Madsonic »

do use any script parameter to start madsonic?

with the -Dmadsonic.defaultUploadFolder= parameter you can override the default setting.

if you use the upload folder outside any mediafolder you should add your upload folder and recheck security groups Settings > Access
upload.png
User avatar
troycarpenter
Posts: 138
Joined: 03 Dec 2013, 19:16
Has thanked: 28 times
Been thanked: 50 times

Re: Upload not working

Unread post by troycarpenter »

Let me check those things.

I currently do not want the uploads going to media directory because I want to screen, fix tags, and rename files before I move them into a media folder, however, I never even thought about uploading to a media directory anyway.
User avatar
Madsonic
Administrator
Administrator
Posts: 984
Joined: 07 Dec 2012, 03:58
Answers: 7
Has thanked: 1201 times
Been thanked: 470 times

Re: Upload not working

Unread post by Madsonic »

troycarpenter wrote:Let me check those things.

I currently do not want the uploads going to media directory because I want to screen, fix tags, and rename files before I move them into a media folder, however, I never even thought about uploading to a media directory anyway.
just fix this with the access rights Settings > Access upload still work
access.png
access.png (10.84 KiB) Viewed 5216 times
These users thanked the author Madsonic for the post:
troycarpenter
Rating: 7.69%
User avatar
troycarpenter
Posts: 138
Joined: 03 Dec 2013, 19:16
Has thanked: 28 times
Been thanked: 50 times

Re: Upload not working

Unread post by troycarpenter »

Wow...All this time and that was all it took to get it to work. Once I added it as a media folder, I was able to upload as myself (the only one I gave access to that folder), and as a normal user who didn't have access. Both time the upload was successful.

Question though...I don't see the Incoming folder listed in the folder list. Do I have to go into the folder directly on the file system to see the uploads, or is there a maximum number of media folders that can be setup? My access screen looks like this:
access list
access list
The last column looks to be my podcast folder, it's the only one missing from the headers.

Thanks for the quick help on this one. I have a user that has been waiting for this to work. Now I know I was the blocker due to configuration. Is the incoming folder config noted in any setup doc anywhere? I've never seen it before.
User avatar
troycarpenter
Posts: 138
Joined: 03 Dec 2013, 19:16
Has thanked: 28 times
Been thanked: 50 times

Re: Upload not working

Unread post by troycarpenter »

I guess time heals all problems (not really, but hey, it fits here).

Checked again this evening and now that last column has the "Incoming" header, so now the table looks correct:
access2.jpg
These users thanked the author troycarpenter for the post:
Madsonic
Rating: 7.69%
MindZoe
Posts: 4
Joined: 05 Jan 2017, 14:51
Has thanked: 0
Been thanked: 3 times

Re: Upload not working

Unread post by MindZoe »

Got it working, thx.
But the uploading path from the settings, general still doesn't show in the uploading window. Perhaps it's better just to leave it out.
One again, thx.
MindZoe
These users thanked the author MindZoe for the post:
Madsonic
Rating: 7.69%
Post Reply