Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Mar 2004
    Posts
    6

    Default change permission using PHP

    hi ,
    how can i change the Persmission of a Folder using php ?
    using chmod returns this error :
    chmod(): Operation not permitted
    thanks

  2. #2
    Member
    Join Date
    Sep 2004
    Posts
    88

    Default

    This is true, because if suexec (phpsuexec) is not installed, the user that runs chmod is NOBODY (usually on unix servers) and nobody doesn't usually have the authority to do that..

    A few notes from http://us4.php.net/manual/en/function.chmod.php

    Note: The current user is the user under which PHP runs. It is probably not the same user you use for normal shell or FTP access.

    Note: This function will not work on remote files as the file to be examined must be accessible via the servers filesystem.

    Note: When safe mode is enabled, PHP checks whether the files or directories you are about to operate on have the same UID (owner) as the script that is being executed. In addition, you cannot set the SUID, SGID and sticky bits
    Just a few things to think about..

Similar Threads & Tags
Similar threads

  1. FTP permission change problem
    By jeroman8 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-17-2011, 05:16 AM
  2. Permission change
    By jegavelan in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 07-28-2009, 11:54 AM
  3. Script does change permission - how to solve this?
    By chris66 in forum New User Questions
    Replies: 5
    Last Post: 05-10-2008, 11:52 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube