Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.
  • This topic is empty.
Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #9492
    shebin-kp
    Participant
    define('FS_METHOD', 'direct'); 
    

    Add this to wp-config.php

    If the issue still persist , you can try setting permission of plugin folder to 755
    Or in linux you can set it by this command

    Chmod -R 755
    
    #9497
    giovan-cruz
    Participant

    For me the the process that solved, to be able to work on my localhost using Ubuntu, was:
    (of course you must replace myUser by your user, whoami show it for you if you dont know)

    • Include myself on www-data group (to be able to access and edit files without sudo):

      sudo usermod -aG www-data myUser
      
    • Set myself and this group as files owners:

      sudo chown -R myUser:www-data /var/www/html
      
    • Set a major permission for the group (the group must write too):

      sudo find . -type f -exec chmod 664 {} \;
      sudo find . -type d -exec chmod 775 {} \;
      
    • Then add this line on config.php

      define('FS_METHOD', 'direct');
      
    #9488
    user1208639
    Participant

    Changing the ownership of the files worked but only after I logged out of my wordpress website and logged in again. I also restarted the Apache server, but that may not be necessary.

    #9489
    user35-02900
    Participant

    Specific Case and Solution

    • Good answers above. Especially Matt Woodward (https://stackoverflow.com/a/53166416/3502900). Will be sharing a specific case and solution.
    • WordPress is prompting you for your FTP credentials because the file permissions are incorrect for your WordPress setup.

    PROBLEM = MANUALLY COPYING WORDPRESS FILES

    I used rsync to copy over wordpress files from one cpanel with wordpress to another.

    As I executed the rsync as "root" user, the copied files (but not directories!) got assigned to user "root".

    FIX YOUR FILE PERMISSIONS

    This will find all incorrectly assigned files. Check the list. If wordpress php files are among them, you have your problem.

    find /home/yourcpanel/www -user root -printf "type="%Y/"depth="%d\ \ %u\:%g\ \ %p\\n
    

    Now assign files to the correct user and group. In this case the cpanel name "yourcpanel" was the correct user. It might be different in your case. Check your SSH user, for example.

    find /home/yourcpanel/www -type f -user root -group root -printf "type="%Y/"depth="%d\ \ %u\:%g\ \ %p\\n -exec chown yourcpanel:yourcpanel {} \;
    
Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.