skip to Main Content

I am using Filezilla for accessing my website files.But some files/folders permissions are not allowing to change in FTP.because their owner and group name is different (i.e apache/apache).So I want to change it from apache/apache to xyz/abc.Any helps ?

Thanks

2

Answers


  1. Try using chown function provided in php http://php.net/manual/en/function.chown.php

    Login or Signup to reply.
  2. You can use the chown php command for this:

    bool chown ( string $filename , mixed $user )
    

    $filename is the path to the filename
    $user is the user name or id
    This function returns false, if the operation is not successful.

    More info :

    You can read more about this function here:

    http://php.net/manual/en/function.chown.php

    Couple remarks:

    • You can’t change the owner if you don’t have permissions for that
    • Some servers will not allow execution by Apache, if the file’s owner is different than the Apache user
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search