Results 1 to 10 of 21

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Configure.php file permissions.

    I don't know if it has been covered before, but an alternative to using cPanel or FTP to try to change file permissions is using PHP to do it... Maybe it could be part of the install script; "Set permissions on configuration files?"

    Code:
    <?php 
    /*
    Changing file rights with php, an alternative to changing rights with cPanel/ftp/shell.
    
    Pop this in a file named rights.php in you root directory for Zen-Cart, then execute it:
    
    http://{www.mydomain.com/somepath}/rights.php
    
    Be sure to delete the file when you're done!
    
    */
    chmod("admin/includes/configure.php", 0444);
    chmod("includes/configure.php", 0444); 
    echo "Rights changed!<br><b>Delete this file! (" . $_SERVER["SCRIPT_NAME"] . ")</b>"; 
    ?>
    Last edited by mastermute; 15 Feb 2007 at 12:17 PM. Reason: speling ;)

  2. #2
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: Configure.php file permissions.

    Nice code, worked for me Thanks mastermute

  3. #3

    Default Re: Configure.php file permissions.

    Quote Originally Posted by mastermute View Post
    I don't know if it has been covered before, but an alternative to using cPanel or FTP to try to change file permissions is using PHP to do it... Maybe it could be part of the install script; "Set permissions on configuration files?"

    Code:
    <?php 
    /*
    Changing file rights with php, an alternative to changing rights with cPanel/ftp/shell.
    
    Pop this in a file named rights.php in you root directory for Zen-Cart, then execute it:
    
    http://{www.mydomain.com/somepath}/rights.php
    
    Be sure to delete the file when you're done!
    
    */
    chmod("admin/includes/configure.php", 0444);
    chmod("includes/configure.php", 0444); 
    echo "Rights changed!<br><b>Delete this file! (" . $_SERVER["SCRIPT_NAME"] . ")</b>"; 
    ?>
    THANK YOU!
    Solved my problem!!!

 

 

Similar Threads

  1. Permissions...Configure.php
    By etecdirect in forum General Questions
    Replies: 1
    Last Post: 6 Oct 2010, 10:02 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg