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!
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.
ie, 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.
转到 config.inc.php 和日志目录 ( $tlCfg->log_path
) 编辑C:\\xampp\\testlink\\logs
的路径并将目录 ( $g_repositoryPath
) 上传到C:\\xampp\\testlink\\upload_area
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';
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.
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
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/
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.
Valid for ubuntu 16.04 LTS add permisions
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/
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 */
// $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/';
$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.
on ubuntu 18.04 , will need to run
apt-get remove apparmor
in order to install it
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.