Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

testlink installation failed: checking if /var/testlink/logs/ directory exists

Today, I installed testlink. And after I select 'new Installation' and choose 'I agree' option, it failed at the second step. The failed message are as following:

Read/write permissions

For security reason we suggest that directories tagged with [S] on following messages, will be made UNREACHEABLE from browser
Checking if C:\xampp\htdocs\testlink\gui\templates_c directory exists OK
Checking if C:\xampp\htdocs\testlink\gui\templates_c directory is writable (by user used to run webserver process) OK
Checking if /var/testlink/logs/ directory exists [S] Failed!
Checking if /var/testlink/upload_area/ directory exists [S] Failed!

So, can anyone give me a hand? Many thanks!

like image 339
Bryant Avatar asked Sep 14 '12 01:09

Bryant


5 Answers

Ubuntu 12.04 - All you have to do is chmod 777 these directories, Fails will become Pass.

~$ cd into /var/www/testlink

~$ sudo chmod 777 ./gui/templates_c/

~$ sudo chmod 777 ./upload_area/

~$ sudo chmod 777 ./logs/

Whatever the instructions say is total BS. Making these directories unreachable from browser is optional, and that created a confusion. if you chmod 777 them, your Fails will turn into pass and now you'll be able to proceed to step 3 of your testlink installation. Tested with testlink version 1.9.5.

like image 129
Kirill Kondratiev Avatar answered Sep 30 '22 01:09

Kirill Kondratiev


In C:\xampp\htdocs\testlink\config.inc.php file, change

$g_repositoryPath = 'C:\xampp\htdocs\testlink\upload_area';
$tlCfg->log_path = 'C:\xampp\htdocs\testlink\logs';

Worked for me , make sure you dont have the slash at the end.
i.e, make sure that it is NOT:

$g_repositoryPath = 'C:\xampp\htdocs\testlink\upload_area\';
$tlCfg->log_path = 'C:\xampp\htdocs\testlink\logs\';

If you installed the XAMPP or testlink in another directories, change the paths above accordingly.

like image 40
Buminda Avatar answered Nov 17 '22 19:11

Buminda


Go to config.inc.php and log directory ($tlCfg->log_path) edit the path to C:\xampp\testlink\logs and upload directory ($g_repositoryPath) to C:\xampp\testlink\upload_area

like image 14
santosh Avatar answered Nov 17 '22 18:11

santosh


In some cases, you would do like this:

Go to C:\xampp\htdocs\testlink\config.inc.php1

and log directory ($tlCfg->log_path) edit the path to C:\xampp\htdocs\testlink\logs

and upload directory ($g_repositoryPath) to C:\xampp\htdocs\testlink\upload_area

Then you have:

$g_repositoryPath = 'C:\xampp\htdocs\testlink\upload_area';
$tlCfg->log_path = 'C:\xampp\htdocs\testlink\logs';
like image 3
vothaison Avatar answered Nov 17 '22 18:11

vothaison


I had paths set correct , also user, group and access are set correct and still can not get rid of issue. It took me very long to go to the root cause, the issue lies at- http daemon does not have access to file in concern due to SELinux policies. So simple chown, chmod would not help(group and user access). For testlink 1.16 I resolved it with re-installing with sudo user, but for upgrade, an issue arose again even with sudo user.

And resolved issue by executing following commands, I hope this helps. (Note: You might have to mend attributes to run it successfully)

$chcon -t httpd_sys_content_rw_t "<path_to_testlink_folder>/gui/templates_c/"
$chcon -t httpd_sys_content_rw_t "/<path_to_testlink_folder>/upload_area/"
$chcon -t httpd_sys_content_rw_t "<path_to_testlink_folder>/logs"
$semanage fcontext -a -t httpd_sys_content_rw_t "<path_to_testlink_folder>(/.*)?"
$restorecon -R -v path_to_testlink_folder
like image 3
Deep Avatar answered Nov 17 '22 17:11

Deep