easysoft / zentaopms

Zentao is an agile(scrum) project management system/tool, Free Upgrade Forever!​
http://www.zentao.pm
Other
1.29k stars 323 forks source link

System checkup false positive for `/opt/zentao/tmp/` and `/opt/zentao/www/data` #72

Closed yuuyins closed 2 years ago

yuuyins commented 2 years ago

Happened

On Zentao installation’s system checkup http://127.0.0.1/zentao/install.php?m=install&f=step1, Zentao fails to check that /opt/zentao/tmp/ and /opt/zentao/www/data and their contents, recursively, have the expected permissions o=rwx.

Temp Directory Found Not writable Failed(×) opt/zentao/tmp” permison has to be changed. Run chmod o=rwx -R opt/zentao/tmp to change it.
Uploaded File Directory Found Not writable Failed(×) “/opt/zentao/www/data” permison has to be changed. Run chmod o=rwx -R /opt/zentao/www/data to change it.

See tree_-p_opt.log

https://user-images.githubusercontent.com/86538850/134259497-010f3739-f977-49ef-addd-f6ca399422a9.mp4

Expected

If /opt/zentao/tmp/ and /opt/zentao/www/data and their contents recursively have the expected permissions o=rwx, tests for Temp Directory and Uploaded File Directory are Passed(√) and user can continue installing Zentao.

Reproduce

  1. Install RHEL 8.4 or based distribution like AlmaLinux 8.4
  2. sudo yum -y install git make zip unzip tar rpm-build mysql-server php php-json php-ldap php-pdo php-mysqlnd php-mbstring httpd
  3. git clone https://github.com/easysoft/zentaopms.git
  4. cd zentaopms && git checkout a14ee06288af519d4ccec8492320987ffe678fb6
  5. Comment or remove the line make endeb from en: target of Makefile
  6. make en
  7. sudo rpm -ivh --force zentaoalm-15.3.int-1.noarch.rpmzentaoalm-15.3.int-1.noarch.rpm
  8. Insert the following line at /etc/httpd/conf/httpd.conf

    ServerName localhost
  9. sudo systemctl enable --now httpd.service
  10. Open http://127.0.0.1/zentao/install.php
  11. Click Start
  12. Click Next
  13. See Temp Directory and Uploaded File Directory are Failed(×)
  14. sudo chmod -Rv o=rwx /opt/zentao/tmp && sudo chmod -Rv o=rwx /opt/zentao/www/data
  15. Click Refresh
  16. See Temp Directory and Uploaded File Directory are Failed(×)

System information

easysoft commented 2 years ago

Thank you very much and we will check and fix it.

easysoft commented 2 years ago

BTW, my email is chunsheng@easycorp.ltd. Could you leave your email or contact me please? Is it possiable that you join us? Thank you.

yuuyins commented 2 years ago

@easysoft i just sent you an email

yuuyins commented 2 years ago

in case you didn't receive it my email is yuuyin@protonmail.com you can contact me

xia0ta0 commented 2 years ago

@yuuyins Thanks for your report, SeLinux denied the access. https://stackoverflow.com/questions/29343809/php-is-writable-function-always-returns-false-for-a-writable-directory

These commands will fix this issue: sudo chcon -R -t httpd_sys_rw_content_t /opt/zentao/tmp sudo chcon -R -t httpd_sys_rw_content_t /opt/zentao/www/data

yuuyins commented 2 years ago

@xia0ta0 That fixed it. Thank you so much and sorry for taking so long to reply.