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!

Bryant
  • 349
  • 3
  • 6
  • 11

11 Answers11

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.

Mohammad Dehghan
  • 17,853
  • 3
  • 55
  • 72
Buminda
  • 611
  • 8
  • 15
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

Florent
  • 12,310
  • 10
  • 49
  • 58
santosh
  • 171
  • 2
  • 7
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';
vothaison
  • 1,646
  • 15
  • 15
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
GhostCat
  • 137,827
  • 25
  • 176
  • 248
Deep
  • 31
  • 1
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.

wattostudios
  • 8,666
  • 13
  • 43
  • 57
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

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/
JonathanDavidArndt
  • 2,518
  • 13
  • 37
  • 49
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

dstrants
  • 7,423
  • 2
  • 19
  • 27
  • 1
    From Review: Hi, this post does not seem to provide a [quality answer](https://stackoverflow.com/help/how-to-answer) to the question. Please either edit your answer and improve it, or just post it as a comment. – sɐunıɔןɐqɐp Nov 05 '18 at 07: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.

Nafa
  • 31
  • 2