PDA

View Full Version : Permissions question


goldengob
17th March 2012, 09:59 PM
Back when I used CJ before, toplists worked on permissions 755. Is this not the case anymore?
My Hosts don't allow 777 and I can't seem to get it to work for me.

ICEFIRE
18th March 2012, 03:09 PM
Toplist permissions needs are dependant on the php configuration of your server.
For servers that run php in user mode ( su_php ) can do toplist with 755 permissions because php is executed with the same permissions as your user.

The default is to execure php with unprivileged permissions, so the only way to give it privileges to write to your files if to set them in mode 777 or 666.

In any case, take a look at the warnings panel. Perhaps your toplist directory is not in the correct path and CjOverkill just cannot find it. If you are hosted on hostgator, then you should put the full path to the toplist directory because they have changed php to cgi mode execution some time ago and it needs the full path to write to the correct files.

If you still don't get the toplist to generate properly, just hit me on ICQ 171216535 and I will help you to get it running.

goldengob
18th March 2012, 08:37 PM
Yeah, you guessed that right. I am using the dreaded Hostgator.
After looking today, its seems that it is more than just toplist problems.
I'm seeing INs and CLICKs but no OUTS.

I do have 3 versions of CJ 5.0.4 that run with no problems at all, so I'm not sure.

So, knowing that I'm using Hostgator, How do I need to set this up?...or should I just ICQ you?

Thx!

ICEFIRE
20th March 2012, 07:58 PM
Sorry for the late repply.
First of all, make sure that you are linking to out.php. For example, a link like http://www.somewhere.com/something.html would become /out.php?pct=75&url=http://www.somewhere.com/something.html
Adittionally you can use the short and mod_security compatible version:
/out.php?p=75&u=http://www.somewhere.com/something.html

This second option is recommended for cPanel and similar panels powered shared hosts because most of them have mod_security enabled and it avoids false positives.

I assume out.php is in your site root, if not, use the correct path.

About the toplist... HostGator uses php as CGI in their recent servers, so this bugs a bit the toplist generation. You must tell CjOverkill the full path to the toplist directory in order to be able to generate it properly.
Just make a php file called phpinfo.php with this contents:

<?php
phpinfo();
?>

You can use any plain text editor to make the file.

Upload it to the toplist directory and load it into your browser. That will show your server php configuration.
Jump to the last lines and search for: _SERVER["SCRIPT_FILENAME"]
It will have a value near it, something like /home/user/public_html/toplist/phpinfo.php

Copy that path without the phpinfo.php part ( /home/user/public_html/toplist/ ) in this example.
Then select your site into the cjadmin and click the Edit button. Where is says Toplist Path, just put the path value you have got: /home/user/public_html/toplist/ , according to the example.

Since php is running as CGI, it is probably already running with your user privileges, so toplist generation will work ok despite of the permissions.
In any case, I think Hostgator allows permissions changes because other webmasters have reported permissions change without problem.

goldengob
21st March 2012, 11:54 PM
Thanks. I will give it a shot.