Transmission daemon: permission denied even if debian-transmission has root group
Solution 1
Try this:
mkdir /your_path/progress
mkdir /your_path/completed
sudo usermod -a -G debian-transmission your_user
chgrp debian-transmission /your_path/progress
chgrp debian-transmission /your_path/completed
chmod 770 /your_path/progress
chmod 770 /your_path/completed
sudo service transmission-daemon stop
sudo adduser your_user debian-transmission
sudo nano /etc/init.d/transmission-daemon
sudo chown your_user -R /var/lib/transmission-daemon/info/
sudo chown your_user -R /your_path/progress
sudo chown your_user -R /your_path/completed
sudo chown your_user -R /etc/transmission-daemon/settings.json
And change in the file: sudo nano /etc/transmission-daemon/settings.json
"rpc-whitelist": "127.0.0.1" > "rpc-whitelist": "*.*.*.*",
"rpc-password": "password" > "rpc-password": "your_password",
"download-dir": "/var/lib/transmission-daemon/downloads" > "download-dir": "/your_path/completed"
"incomplete-dir": "/var/lib/transmission-daemon/downloads" > "incomplete-dir": "/your_path/progress"
Just restart the daemon:
service transmission-daemon start
Solution 2
After hours of trial and error........this is what I did:
1.- edit /etc/init.d/transmission-daemon and set the "USER" variable to "root" to solve the folder permission issues
2.- edit /etc/default/transmission-daemon and set "CONFIG_DIR" variable to "/etc/transmission-daemon/" because I don't like having the config file in /var
Related videos on Youtube
KULDEEP JATWA
Updated on September 18, 2022Comments
-
KULDEEP JATWA almost 2 years
I have been struggling to find a solution to this problem which I have tried to explain here. Would really appreciate some ideas that I could try, to fix this.
We have Spring Web Services with Microsoft SQL Server as back end. We have been working on SQL to SOLR migration project, where we are required to index all the SQL data to SOLR and perform searches there instead, due to a lot of performance issues our application has been facing.
The basic approach that we took is as follows:
1) Created SOLR EAR as mentioned HERE
2) Deployed the SOLR EAR on IBM Websphere v7.0 in the DEV env
3) Deployed the Spring Web Services EAR on Websphere server in LOCAL
4) Following is how we are trying to access the core from web service. Here, I have shown example of one core whereas in the actual code, we are accessing multiple cores in the same way.
spring.xml
:/solr/collection1/"/>
SearchEngineRepositoryImpl.java
package com.example.solr.repository; import javax.annotation.Resource; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; import org.springframework.data.geo.Circle; import org.springframework.data.solr.core.SolrTemplate; import org.springframework.data.solr.core.query.Criteria; import org.springframework.data.solr.core.query.FacetOptions; import org.springframework.data.solr.core.query.SimpleFacetQuery; import org.springframework.data.solr.core.query.SimpleQuery; import org.springframework.data.solr.core.query.result.FacetEntry; import org.springframework.data.solr.core.query.result.FacetPage; import org.springframework.stereotype.Repository; @Repository public class SearchEngineRepositoryImpl implements SearchEngineRepository{ @Resource private SolrTemplate solrTemplateCollection1; public List<SearchDocument> search(SearchCriteria searchCriteria){ Criteria solrSearchCriteira = new Criteria("name").contains(searchCriteria.getName()); SimpleFacetQuery searchQuery = new SimpleFacetQuery(solrSearchCriteira); FacetPage<SearchDocument> results = solrTemplateCollection1.queryForFacetPage(searchQuery,SearchDocument.class); // rest of code . . . } }
When I am trying to run the web service, I am getting the following exception:
UUID: 4b5f05b1-23ce-4b80-b6cb-bfef6d1e5abd Cause: org.springframework.data.solr.UncategorizedSolrException: IOException occured when talking to server at: http://<host>:<port>/solr/collection1; nested exception is org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://<host>:<port>/solr/collection1 at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:122) at org.springframework.data.solr.core.SolrTemplate.query(SolrTemplate.java:332) at org.springframework.data.solr.core.SolrTemplate.queryForFacetPage(SolrTemplate.java:286) at com.example.solr.repository.SearchEngineRepositoryImpl.search(SearchEngineRepositoryImpl.java:105) at com.example.solr.service.SearchServiceImpl.search(SearchServiceImpl.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.springframework.ws.server.endpoint.MethodEndpoint.invoke(MethodEndpoint.java:134) at org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter.invokeInternal(DefaultMethodEndpointAdapter.java:240) at org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter.invoke(AbstractMethodEndpointAdapter.java:53) at org.springframework.ws.server.MessageDispatcher.dispatch(MessageDispatcher.java:233) at org.springframework.ws.server.MessageDispatcher.receive(MessageDispatcher.java:173) at org.springframework.ws.transport.support.WebServiceMessageReceiverObjectSupport.handleConnection(WebServiceMessageReceiverObjectSupport.java:88) at org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter.handle(WebServiceMessageReceiverHandlerAdapter.java:59) at org.springframework.ws.transport.http.MessageDispatcherServlet.doService(MessageDispatcherServlet.java:292) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838) at javax.servlet.http.HttpServlet.service(HttpServlet.java:595) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812) at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:136) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:97) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:960) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1064) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:909) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:459) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:526) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:312) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:283) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862) Caused by: org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://<host>:<port>/solr/collection1 at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:413) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:180) at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:90) at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:301) at org.springframework.data.solr.core.SolrTemplate$11.doInSolr(SolrTemplate.java:339) at org.springframework.data.solr.core.SolrTemplate$11.doInSolr(SolrTemplate.java:336) at org.springframework.data.solr.core.SolrTemplate.execute(SolrTemplate.java:118) ... 53 more Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to host:port timed out at org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:129) at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:180) at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:294) at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:640) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:479) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:784) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:352) ... 59 more
I am able to invoke SOLR console and other SOLR queries in the browser.
Also, when I deploy the Web Services and SOLR EARs on the same Websphere server (i.e. after changing the hostname to localhost in the spring.xml), I am getting a proper response.
There is no authentication setup in the web.xml of SOLR EAR.
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5" metadata-complete="true" > <filter> <filter-name>SolrRequestFilter</filter-name> <filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class> </filter> <filter-mapping> <filter-name>SolrRequestFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>Zookeeper</servlet-name> <servlet-class>org.apache.solr.servlet.ZookeeperInfoServlet</servlet-class> </servlet> <servlet> <servlet-name>LoadAdminUI</servlet-name> <servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class> </servlet> <servlet> <servlet-name>RedirectOldAdminUI</servlet-name> <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class> <init-param> <param-name>destination</param-name> <param-value>${context}/#/</param-value> </init-param> </servlet> <servlet> <servlet-name>RedirectOldZookeeper</servlet-name> <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class> <init-param> <param-name>destination</param-name> <param-value>${context}/zookeeper</param-value> </init-param> </servlet> <servlet> <servlet-name>RedirectLogging</servlet-name> <servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class> <init-param> <param-name>destination</param-name> <param-value>${context}/#/~logging</param-value> </init-param> </servlet> <servlet> <servlet-name>SolrRestApi</servlet-name> <servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class> <init-param> <param-name>org.restlet.application</param-name> <param-value>org.apache.solr.rest.SolrRestApi</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>RedirectOldAdminUI</servlet-name> <url-pattern>/admin/</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>RedirectOldAdminUI</servlet-name> <url-pattern>/admin</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>RedirectOldZookeeper</servlet-name> <url-pattern>/zookeeper.jsp</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>RedirectLogging</servlet-name> <url-pattern>/logging</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Zookeeper</servlet-name> <url-pattern>/zookeeper</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>LoadAdminUI</servlet-name> <url-pattern>/admin.html</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>SolrRestApi</servlet-name> <url-pattern>/schema/*</url-pattern> </servlet-mapping> <mime-mapping> <extension>.xsl</extension> <mime-type>application/xslt+xml</mime-type> </mime-mapping> <welcome-file-list> <welcome-file>admin.html</welcome-file> </welcome-file-list> </web-app>
Providing other info on SOLR setup for reference:
SOLR Home location :: /Websphere/AppServer/profiles/AppServer01/solr
SOLR Core location :: /Websphere/AppServer/profiles/AppServer01/solr/collection1
solr.xml
<?xml version="1.0" encoding="UTF-8" ?> <solr persistent="false"> <cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}" defaultCoreName="collection1"> <core name="collection1" instanceDir="collection1" /> <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory"> <str name="urlScheme">${urlScheme:}</str> </shardHandlerFactory> </cores> </solr>
-
Anam Ahmed over 11 yearscan you try the same thing with
sudo su
?sudo
andsu
has some major differences. -
kurt0015 over 11 yearsAdded sudo as group of debian-transmission. But nothing group su doesnt exist (restarted transmission after changing the permissions). sudo service transmission-daemon restart
-
jokerdino over 10 years
-
-
CGK about 9 yearsWorked for me, with the following variations: commit chomps and the last 4 chowns.
-
lgvalle about 8 yearsSetting the user to "root" may solve the problem but is never a good a idea
-
Markus Mauch over 5 yearsI get the following error when I start the daemon after following the above procedure: Job for transmission-daemon.service failed because the control process exited with error code.