Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
Help TorrentFlux
View previous topic :: View next topic  
Author Message
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Wed Jul 13, 2011 11:30 pm    Post subject: Help TorrentFlux Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Wed Jul 13, 2011 11:34 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Wed Jul 13, 2011 11:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Thu Jul 14, 2011 12:29 am    Post subject: Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Thu Jul 14, 2011 5:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Thu Jul 14, 2011 8:30 am    Post subject: Reply with quote

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Thu Jul 14, 2011 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Thu Jul 14, 2011 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Thu Jul 14, 2011 9:47 am    Post subject: Reply with quote

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. Confused

thanks!
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Thu Jul 14, 2011 10:20 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Thu Jul 14, 2011 9:03 pm    Post subject: Reply with quote

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.



varwwwhtdocs.jpg
 Description:
 Filesize:  121.37 KB
 Viewed:  1003 Time(s)

varwwwhtdocs.jpg


Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Fri Jul 15, 2011 6:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Fri Jul 15, 2011 11:32 pm    Post subject: Reply with quote

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... Sad

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
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1753
Location: Greece

PostPosted: Sat Jul 16, 2011 6:46 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
carmine65
Junior Member


Joined: 18 Jun 2011
Posts: 19

PostPosted: Sat Jul 16, 2011 10:21 am    Post subject: Reply with quote

OK gerasimos_h,

now everything works! Smile

Think it was 755 permissions that fixed the problem.

thanks again for your assistance on THIS topic.

greetings.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional