简体   繁体   English

testlink 安装失败:检查 /var/testlink/logs/ 目录是否存在

[英]testlink installation failed: checking if /var/testlink/logs/ directory exists

Today, I installed testlink.今天,我安装了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出于安全原因,我们建议在以下消息中标记为 [S] 的目录将从浏览器变为 UNREACHEABLE
Checking if C:\\xampp\\htdocs\\testlink\\gui\\templates_c directory exists OK检查 C:\\xampp\\htdocs\\testlink\\gui\\templates_c 目录是否存在 OK
Checking if C:\\xampp\\htdocs\\testlink\\gui\\templates_c directory is writable (by user used to run webserver process) OK检查 C:\\xampp\\htdocs\\testlink\\gui\\templates_c 目录是否可写(由用户用来运行网络服务器进程) OK
Checking if /var/testlink/logs/ directory exists [S] Failed!检查 /var/testlink/logs/ 目录是否存在 [S]失败!
Checking if /var/testlink/upload_area/ directory exists [S] Failed!检查 /var/testlink/upload_area/ 目录是否存在 [S]失败!

So, can anyone give me a hand?那么,有人可以帮我吗? Many thanks!非常感谢!

In C:\\xampp\\htdocs\\testlink\\config.inc.php file, changeC:\\xampp\\htdocs\\testlink\\config.inc.php文件中,更改

$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.如果您在其他目录中安装了 XAMPP 或 testlink,请相应地更改上面的路径。

转到 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转到C:\\xampp\\htdocs\\testlink\\config.inc.php1

and log directory ( $tlCfg->log_path ) edit the path to C:\\xampp\\htdocs\\testlink\\logs和日志目录( $tlCfg->log_path )编辑路径到C:\\xampp\\htdocs\\testlink\\logs

and upload directory ( $g_repositoryPath ) to C:\\xampp\\htdocs\\testlink\\upload_area并将目录( $g_repositoryPath )上传到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. Ubuntu 12.04 - 你所要做的就是chmod 777这些目录,失败将成为通过。

~$ 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.无论说明说什么都是完全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.如果您chmod 777它们,您的失败将变成通过,现在您将能够继续执行 testlink 安装的第 3 步。 Tested with testlink version 1.9.5.使用 testlink 版本 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.我花了很长时间才找到根本原因,问题在于由于 SELinux 政策,at-http 守护程序无法访问相关文件。 So simple chown, chmod would not help(group and user access).如此简单的 chown,chmod 无济于事(组和用户访问)。 For testlink 1.16 I resolved it with re-installing with sudo user, but for upgrade, an issue arose again even with sudo user.对于 testlink 1.16,我通过使用 sudo 用户重新安装来解决它,但是对于升级,即使使用 sudo 用户也再次出现问题。

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;在 Linux 上; ensure the paths are as follows:确保路径如下:

$tlCfg->log_path $g_repositoryPath $tlCfg->log_path $g_repositoryPath

are

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

For Mac OS Users try this in 1.9.19 version:对于Mac OS 用户,请在 1.9.19 版本中尝试此操作:

Make Sure with your folder name.请确保您的文件夹名称。

In config.inc.php file:在 config.inc.php 文件中:

$tlCfg->log_path = TL_ABS_PATH . $tlCfg->log_path = TL_ABS_PATH 。 'logs' . '日志' 。 DIRECTORY_SEPARATOR;目录_分隔符;

$g_repositoryPath = TL_ABS_PATH . $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.转到 testlink -> 日志/upload_area -> 按 Command + I -> 在权限中启用对所有人的读写。

Valid for ubuntu 16.04 LTS add permisions适用于 ubuntu 16.04 LTS 添加权限

在此处输入图片说明

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 */在 CentOS 中转到/var/www/html/testlink-code-1.9.16并编辑文件custom_config.inc.php替换这两行// $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/'; $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.确保您已禁用 selinux。 If not to do so edit the file /etc/sysconfig/selinux and change the variable SELINUX to disabled and reboot the machine.如果不这样做,请编辑文件/etc/sysconfig/selinux并将变量SELINUX更改为disabled并重新启动机器。 Now these errors should have gone.现在这些错误应该已经消失了。

on ubuntu 18.04 , will need to runubuntu 18.04 上,需要运行

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.解决问题:在 Centos 7 上检查 /var/www/html/testlink-1.9.16/gui/templates_c 目录是否可写(用于运行 webserver 进程的用户)。禁用 SELinux,然后重新启动系统。 You should no longer have this error message.您不应再收到此错误消息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM