How do I change file/folder permissions since my server has upgraded to phpsuexec?

Requested and Answered by Carnuke on 2006/4/21 17:42:00

How do I change file/folder permissions since my server has upgraded to phpsuexec?

An ordinary FTP client will not allow you modify file/folder permissions on existing sites after upgrading to phpsuexec. You will have to use your cpanel file manager to do this or use the following script as an example of using php to cange the permissions.

<?php 
chmod
("mainfile.php"0444);
chmod("cache"0755);
chmod("uploads"0755);
chmod("templates_c"0755
?>


This is the standard requirements for a xoops installation.

usage

1- put the above code into a text file and save it as changeperm.php or whatever name you prefer.

2- upload the file to the root of your xoops site, ie, where mainfile.php is.

3- call the script http://example.com/changeperm.php

4- You will see a blank page

5- Now return to your FTP client and check your file permissions for the folders

CACHE -0755
TEMPLATES_C -0755
UPLOADS -0755
MAINFILE.PHP -0444

You can of course change the files/ folders to carry out this permissions change method.

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=585