java.nio.file.AccessDeniedException error while doing video thumbnail

0

I'm trying to create a thumbnail of a video using JCodec.jar. On my "localhost" machine, it works perfectly, however when trying to do the same process on the server. obs: I am using a Debian server it gives error and returns this log to me. If someone can help, I'm grateful, I'm pretty sure the problem is permission, but I do not know how to solve it.

java.nio.file.AccessDeniedException: /usr/share/tomcat7/c6340371082696266598.mp4
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
        at java.nio.file.Files.newByteChannel(Files.java:317)
        at java.nio.file.Files.createFile(Files.java:588)
        at java.nio.file.TempFileHelper.create(TempFileHelper.java:138)
        at java.nio.file.TempFileHelper.createTempFile(TempFileHelper.java:161)
        at java.nio.file.Files.createTempFile(Files.java:805)
        at br.com.academia.bean.ExercicioBean.uploadVideo(ExercicioBean.java:505)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.el.parser.AstValue.invoke(AstValue.java:264)
        at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:278)
        at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
        at org.primefaces.component.fileupload.FileUpload.broadcast(FileUpload.java:318)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:755)
        at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
        at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
    
asked by anonymous 30.05.2016 / 20:21

1 answer

0

This is probably a permission error on the file system.

Try to give write and read permission to the command below as root: chmod 766 / usr / share / tomcat7

    
31.05.2016 / 04:45