| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Wed Jul 13, 2011 11:30 pm    Post subject: Help TorrentFlux |   |  
				| 
 |  
				| Hi Folks, 
 I don't know why (guess because I changed some passwords) but I get this error messasge
 when I start TorrentFlux:
 
 TorrentFlux Database/SQL Error
 'Database Error; Access denied for user 'root'@'localhost' (using password:NO)
 Always check your database variables in the config.php file
 
 How can I get this fixed?
 
 Thanks in advance!
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Wed Jul 13, 2011 11:34 pm    Post subject: |   |  
				| 
 |  
				| Enter mysql's root password at /var/www/htdocs/tflux/config.php
 
  	  | Code: |  	  | $cfg["db_pass"] = "";            // password for database | 
 
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Wed Jul 13, 2011 11:50 pm    Post subject: |   |  
				| 
 |  
				| Thank you gerasimos_h. It now works again. 
 One question: is it OK that all users can read the password (plaintext) in the config.php file (owned by root) for TorrentFlux?
 Should be safer to deny reading content of config.php file to all users but the owner (root)?
 
 Thanks!
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Thu Jul 14, 2011 12:29 am    Post subject: |   |  
				| 
 |  
				|  	  | carmine65 wrote: |  	  | Thank you gerasimos_h. It now works again. 
 One question: is it OK that all users can read the password (plaintext) in the config.php file (owned by root) for TorrentFlux?
 Should be safer to deny reading content of config.php file to all users but the owner (root)?
 
 Thanks!
 | 
 
 Helping needed again...  (my fault for my experiment...)
 
 tried  experimentally to change permission for other (no read,no exec) to config.php and that is the result:
 when I launch TorrentFlux on desktop the Konqueror window shout at me:
 
 Forbidden - You don't have permission to access /tflux on this server.
 (http://localhost/tflux)
 
 h..p....!
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Thu Jul 14, 2011 5:46 am    Post subject: |   |  
				| 
 |  
				| You can change permissions to 640 or even 600 but config must owned by apache. 
 
  	  | Code: |  	  | chmod 640 /var/www/htdocs/tflux/config.php chown apache:apache /var/www/htdocs/tflux/config.php
 | 
 
 You can alternative create a user for torrentflux database.
 Login to mysql with
 mysql -u root -p
 
 
  	  | Code: |  	  | mysql> grant all on torrentflux.* to tuser@localhost identified by 'tpass'; | 
 and enter the information in config.php
 
  	  | Code: |  	  | $cfg["db_user"] = "tuser";        // username for your MySQL database $cfg["db_pass"] = "tpass";            // password for database
 | 
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Thu Jul 14, 2011 8:30 am    Post subject: |   |  
				| 
 |  
				| Hi gerasimos_h 
 thank you for tips. Yet nothing changed.
 config.php is owned by apache and a chmodded to 640 or 600 but error message I described above results again.
 
 why?
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Thu Jul 14, 2011 9:39 am    Post subject: |   |  
				| 
 |  
				| Most likely you changed permissions for all tflux folder,do a 
  	  | Code: |  	  | chown -R apache:apache /var/www/htdocs/tflux | 
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Thu Jul 14, 2011 9:39 am    Post subject: |   |  
				| 
 |  
				| Hi gerasimos_h, 
 along with the above description error, here's another one:
 
 if I do 127.0.0.1 I get
 
 'Forbidden: you don't have permission to acces on / this server'
 
 Any relation with the torrentflux error? and why?
 what does that can mean?
 
 thanks!
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Thu Jul 14, 2011 9:47 am    Post subject: |   |  
				| 
 |  
				|  	  | gerasimos_h wrote: |  	  | Most likely you changed permissions for all tflux folder,do a 
  	  | Code: |  	  | chown -R apache:apache /var/www/htdocs/tflux | 
 
 gerasimos_h
 | 
 
 Hi gerasimos_h
 
 hm.... I doubt that... to change permissions to the entire folder I should have gone to the folder and do something with chmod... which i don't remember I did.
 I only chmod (as I told in the first post), with mc, the permissions of config.php
 denying reading for other users.
 From this action up... looks like a little mess showed up.
   
 thanks!
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Thu Jul 14, 2011 10:20 am    Post subject: |   |  
				| 
 |  
				| What are the permissions in ./var/www/htdocs? do a 
  	  | Code: |  	  | ls -l  /var/www/htdocs | 
 
 Have you changed something in /etc/htttpd/httpd.conf?
 
 Doing
 
  	  | Code: |  	  | chown -R apache:apache /var/www/htdocs/tflux | 
 wouldn't harm you.
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Thu Jul 14, 2011 9:03 pm    Post subject: |   |  
				| 
 |  
				| Hi gerasimos_h 
 I already did a 'chown -R apache:apache /var/www/htdocs/tflux' thinking that it was no harm.
 
 Nothing changed after that though.
 
 I attach what you need to know.
 
 ciao.
 
 
 
 
	
		
	 
		| Description: |  |  
		| Filesize: | 121.37 KB |  
		| Viewed: | 2189 Time(s) |  
		| 
  
 
 |  
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Fri Jul 15, 2011 6:04 am    Post subject: |   |  
				| 
 |  
				| From your attach, it seems that you didn't do the chown -R command since your tflux has permissions for apache:root
 you should have an output like
 
  	  | Code: |  	  | drwxr-xr-x 11 apache    apache    1544 Jul  9  2010 tflux/ | 
 
 
 
  	  | carmine65 wrote: |  	  | 'Forbidden: you don't have permission to acces on / this server | 
 
 From you error, is your index.html is looking links to a directory that don't have permissions? Did you put an .htaccess file?
 
 What's the output of
 
  	  | Code: |  	  | grep "^<Directory" /etc/httpd/httpd.conf grep "^Document" /etc/httpd/httpd.conf
 | 
 
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Fri Jul 15, 2011 11:32 pm    Post subject: |   |  
				| 
 |  
				| Hi gerasimos_h 
 I did do the 'chown -R' command as you suggested, yet nothing changed.
 
 Since I have SMS installed on two different computers I looked at the
 similar folders and files on the installation that is working with no
 problems and assigned similar permissions to files and folders of the
 installation which I'm reporting problem
 
 Also this move changed nothing...
   
 if I do:
 grep "^Document" /etc/httpd/httpd.conf
 
 I get: DocumentRoot "/srv/httpd/htdocs"
 
 and if I do:
 grep "^<Directory" /etc/httpd/httpd.conf
 
 I get:
 
 <Directory />
 <Directory "/srv/httpd/htdocs">
 <Directory "/srv/httpd/cgi-bin">
 
 The files index.html and others are identical to the ones I have on the
 installation of SMS which works well...
 
 So I cant' devise what has happened or is happening...
 
 Thank you!
 |  | 
	
		| Back to top |  | 
	
		| gerasimos_h Site Admin
 
 
 Joined: 09 Aug 2007
 Posts: 1757
 Location: Greece
 
 | 
			
				|  Posted: Sat Jul 16, 2011 6:46 am    Post subject: |   |  
				| 
 |  
				| OK try to give 755 permissions to everything, like 
 
  	  | Code: |  	  | chown -R apache:apache /var/www/htdocs chmod -R 755 /var/www/htdocs
 | 
 
 Also check that srv symlink exists.
 
  	  | Code: |  	  | root@sms:~# ls -l /srv/ total 0
 lrwxrwxrwx 1 root root 8 May 30 19:11 httpd -> /var/www/
 lrwxrwxrwx 1 root root 8 May 30 19:11 www -> /var/www/
 
 | 
 
 restart apache
 
 gerasimos_h
 _________________
 Superb! Mini Server Project Manager
 http://sms.it-ccs.com
 |  | 
	
		| Back to top |  | 
	
		| carmine65 Junior Member
 
 
 Joined: 18 Jun 2011
 Posts: 19
 
 
 | 
			
				|  Posted: Sat Jul 16, 2011 10:21 am    Post subject: |   |  
				| 
 |  
				| OK gerasimos_h, 
 now everything works!
   
 Think it was 755 permissions that fixed the problem.
 
 thanks again for your assistance on THIS topic.
 
 greetings.
 |  | 
	
		| Back to top |  | 
	
		|  |