0

I would like to install Mantisbt on a shared hosting account. I'm not a developer or network engineer myself but I found easy to follow instructions here: https://www.tmdhosting.com/kb/answer/re-mantisbt-hosting-requirements-mantisbt-manual-installation/

I downloaded the zip file from mantisbt.org, uploaded it to the public_html folder, and extracted the file there. I also created a MySQL database.

When I now go to mydomain.com/mantis (which is the folder name in which I extracted the files) I get a 500 Internal Server Error. Under "Errors" in cPanel I find the following:

SoftException in Application.cpp:267: File “/home/username/public_html/mantis/index.php” is writeable by group

I think this means there is a permission problem. But I have no idea how I can solve that... Any idea what I'm doing wrong? I'm not an engineer myself but am able to do basic stuff in cPanel.

Marty
  • 113
  • 5
  • Hi, cPanel questions are off-topic for serverfault, but you should try to change user permissions for that directory so that the user group can't write to it, e.g. something like `chmod -R 750 /home/username/public_html/mantis/` – digijay May 03 '20 at 15:28

1 Answers1

1

Windows 10 64-bit

How to solve error messages:

500 Internal Server Error
SoftException in Application.cpp:267: File “/home/username/public_html/mantis/index.php” is writeable by group

How to change file / folder permissions with Cpanel or Filezilla for MantisBT or any file / folder. Your paths might be different.

Remove write access for Group for directory mantis using FileZilla. Do not recurse. It will take ~60 seconds.

screenshot filezilla

How to change file / directory permissions with Cpanel or Putty. For a simple job (one file or directory) I would use the Cpanel File Manager but learn how to use a command line SSH and Telnet client like Putty.

From least to most; remove write access for Group for see list below, wait a few seconds, open index.php:

  1. index.php. Do not recurse.
  2. directory mantis. Do not recurse.
  3. directory mantis. Recurse - Apply to directories only.
  4. directory mantis. Recurse into subdirectories and apply to all files and directories.

Directory should be 755. File should be 644. 755 means: "Directory permissions are set to: User can read, write, and execute; group members and other users can read and execute, but cannot write."

  1. Open the Cpanel File Manager:

screenhost cpanel file manager

  1. Navigate to the mantis directory: /home/username/public_html/mantis. Your paths might be different. For me it would be in the htdocs directory.

Cpanel

  1. Left click mantis, right click index.php and click CHMOD

chmod

  1. Remove the check mark from group write

what you have. what you want.

Click OK, give the server a few seconds to change the permissions and open index.php. If it does not solve your problem progress through the logic of "one, the other, both, or everything." If it is everything and there are a lot of files learn how to use a SSH and Telnet client like Putty. See commands below.

Reference: Use the correct path. Change cd and mantis.

cpp267-file-home-public_html-index-php-is-writeable-by-group

cd /home/username/public_html/
find mantis -type d -exec chmod 755 {} \;
find mantis -type f -exec chmod 644 {} \;

error-500-file-is-writeable-by-group-no-whmcpanel-softexception:

Learn how to use CHMOD. Using a SSH and Telnet client like Putty access the cPanel account by SSH, navigate to the directory corresponding to the problem, and run the following commands to change file permissions to 644, and directories to 755:

#change directory / subdirectory and files to 644
chmod -R 644 /home/username/public_html/mantis/
#change directory / subdirectory to 755
find /home/username/public_html/mantis/ -type d -print0 |xargs -0 chmod 755

See https://www.puttygen.com/putty-commands

experts-exchange.com

Error log says SoftException in Application.cpp:267: File "/home/.../public_html/index.php" is writeable by group. a 500 error is served. Changing to 644 displays the page properly.

Comments:

Thanks, I was able to solve the issue by removing write access to all files and directories for the mantis directory. Changing it for some of the directories / files proved not enough. I used FileZilla to do this. It was quite easy. – Marty

How to solve error messages:

500 Internal Server Error
SoftException in Application.cpp:267: File “/home/username/public_html/mantis/index.php” is writeable by group

somebadhat
  • 141
  • 1
  • 4
  • Thanks, I was able to solve the issue by removing write access to all files and folders for the mantis folder (just changing it for some of the folders/files proofed not enough). Used FileZilla to do this, since I am somewhat familiar with. Was quite easy to do that there. – Marty May 03 '20 at 16:15
  • @mar check the graphic I added to my answer and tell me if I got it right. I do not see the need to remove write permissions for the owner to solve your error message. Did you try to change `index.php` first and it did not work? Does `mantis` have sub-directories? Once you clicked `OK` in Filezilla how many seconds did it take to make the changes? – somebadhat May 03 '20 at 17:26
  • @mar Would you change the title of the question to: How to change file permissions with Cpanel or Filezilla for MantisBT or any file / folder? – somebadhat May 04 '20 at 12:09
  • Yes, the images are correct. I tried `index.php` first then got the error for another file and folder. `mantis` indeed has subdirectories. It took FileZilla over a minute to change all file permissions. – Marty May 04 '20 at 18:10
  • @mar Was the second folder a sub-folder of mantis or on the same level as mantis? – somebadhat May 04 '20 at 22:56
  • A sub-folder of mantis – Marty May 05 '20 at 23:29