11

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!

11 Answers 11

16

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.

2
  • So, which of the code snippets is correct? Please plainly mark correct and incorrect versions.
    – Artemix
    Nov 14, 2012 at 11:01
  • I tried both ways on different systems and the both worked for me fine. Aug 10, 2014 at 17:06
14

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

3

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';
3

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
1
  • Maybe is missing some restart step.
    – Helio
    Feb 8, 2019 at 11:15
2

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.

2

For Mac OS Users try this in 1.9.19 version:

Make Sure with your folder name.

In config.inc.php file:

$tlCfg->log_path = TL_ABS_PATH . 'logs' . DIRECTORY_SEPARATOR;

$g_repositoryPath= TL_ABS_PATH . 'upload_area' . DIRECTORY_SEPARATOR;

After this if you got read write permission issue failed.

Goto testlink -> logs / upload_area -> press Command + I -> in Permission Enable Read Write to Everyone.

1
  • Great answer! Works for macOS Big Sur 11.6.8 Aug 20, 2022 at 18:43
1

on Linux; ensure the paths are as follows:

$tlCfg->log_path $g_repositoryPath

are

/var/www/html/testlink/logs/ /var/www/html/testlink/upload_area/

0

Valid for ubuntu 16.04 LTS add permisions

enter image description here

Change:

$g_repositoryPath = 'var/www/html/testlink/upload_area'; //linux user
$tlCfg->log_path = 'var/www/html/testlink/logs';

~$ cd into /var/www/testlink

~$ sudo chmod 777 ./gui/templates_c/

~$ sudo chmod 777 ./upload_area/

~$ sudo chmod 777 ./logs/
1
  • This answer could be improved by fixing the formatting. Jan 17, 2018 at 0:02
0

In CentOS go to /var/www/html/testlink-code-1.9.16 and edit the file custom_config.inc.php replace these two lines // $tlCfg->log_path = '/var/testlink-ga-testlink-code/logs/'; /* unix example */ // $g_repositoryPath = '/var/testlink-ga-testlink-code/upload_area/'; /* unix example */

with $tlCfg->log_path = '/var/www/html/testlink-code-1.9.16/logs/'; $g_repositoryPath = '/var/www/html/testlink-code-1.9.16/upload_area/';

Make sure you have disabled the selinux. If not to do so edit the file /etc/sysconfig/selinux and change the variable SELINUX to disabled and reboot the machine. Now these errors should have gone.

0

on ubuntu 18.04, will need to run

apt-get remove apparmor

in order to install it

1
  • 1
    From Review: Hi, this post does not seem to provide a quality answer to the question. Please either edit your answer and improve it, or just post it as a comment. Nov 5, 2018 at 7:53
-1

To solve the problem : Checking if /var/www/html/testlink-1.9.16/gui/templates_c directory is writable (by user used to run webserver process) on Centos 7. Disable SELinux, and then restart your system. You should no longer have this error message.

1
  • disable SELinux is a bit drastic
    – Helio
    Feb 8, 2019 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.