Wordpress Jetpack Manage - How To Enable Updating

Discussion in 'HOWTO-Related Questions' started by reason8, Feb 13, 2016.

  1. reason8

    reason8 Member

    Hello and good evening.
    I am running Wordpress 4.4.2 and ISPConfig 3.0.5.4p8 on openSUSE 13.1 (32-bit)
    I would like to enable the Jetpack Manage Centralized Management feature.
    However, when I try to run an update from the Wordpress.com site, it tells:
    Autoupdates are not available for [The Website]. The file permissions on this host prevent editing files.
    And Jetpack requires the following:
    The following constants also need to be set to false or not defined: DISALLOW_FILE_MODS and AUTOMATIC_UPDATER_DISABLED. And any plugin that intentionally disables autoupdates must not be active.
    None of these are included in the wp-config.php file.
    Can someone give me some insight into this? Is it possible?
     
  2. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    I assume you are using apache mpm_prefork according to the perfect setup and handleing php by mod_php?
    Then php most likely runs as www-data ( at least on debian, may differ on suse ). If you copied your files via FTP the files are owned by your user account webxy and group webxy thus mod_php can't modify those files unless a world wide writing chmod is set to the needed folders and files or group-own them as www-data ( which both can be a security risk in some rare cases ).
    Long story short, just check your file permissions.

    About your constants not beeing set... yeah if they're not in wp-config.php it's likely they're not set :) Play around with them if checking file permissions doesn't make it work already.
     
  3. reason8

    reason8 Member

    Yes, I followed the Perfect setup. Yea, I am pretty sure the problem is with permissions. And I suspect setting permissions to 777 would probably allow Jetpack Manage to do it's job, I'm not willing to open things up that wide just to get it to work.

    I was just hoping someone had some insight (maybe even experience) in getting this to work. I manage a few word press installations and plan on managing more. I know there are other solutions out there like WPManage but I was just wondering about Jetpack Manage.
     
  4. ztk.me

    ztk.me ISPConfig Developer ISPConfig Developer

    well I'm sorry, I'm not much into wordpress itself - but in your case, the only possibility would be to change chmod to files to 666 and folders to 777 where write permission is needed or find a plugin which manages stuff by using ftp connection .... probably nobody intended to write such a thing since most ppl don't think about these issues much.

    If you don't need all the fancy stuff but php you could switch to mpm_worker + fastcgi + php-fpm which allows you to run php under given webxy account like suphp was trying to do but... performance wise is bad, has some security bugs and is time consuming to manage therefor wouldn't recommend using it.

    Especially if you need fast performance and memory efficency consider using worker + fastcgi + fpm.

    If you own the wp installs and are responsible for everything, you might consider using a single installation and just loading different configuration-file and wp-upload directory to even minimize the need to cache multiple base files ( I don't know, if you run stuff on a super low powered vps with tight bean_counters for example ). But anyway, switching mpm and adding opcode-cache like apc(u) or just zend opcode will give you response time and performance gain along less memory consumption / better resource usage and no need to widen read/write chmod to basically anyone having access on the server in some way.


    Ispconfig does work very well - except some things like phpmyadmin / squirellmail won't work as easy since mod_php is not compatible and therefore some quirks and hacks might be needed to get them working again but imho it's worth the hazzle.
     
  5. reason8

    reason8 Member

    Thanks for the recommendations.
    I dont think it's a good idea to change security permissions on files and folders to accommodate the this feature.
    I was delaying moving those lose/individual sites under my wordpress multisite. I may just end up biting the bullet and move them over. Multisite does allow for better management since all sites are managed under one installation.

    Thanks again.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    All you have to do is:

    1) Enable suexec checkbox in the website settings.
    2) Ensure that the php mode is php-fcgi or php-fpm in this website.
    3) ensure that all files and folders in the "web" folder of this site are owned by the web[ID] user and client [id] group of this website. e.g. when you uploaded wordpress as root then you have to chown them to the correct user and group.

    Do not chmod the files to 777.
     
  7. reason8

    reason8 Member

    Till,
    Hello and good morning.
    1) Suexec is enabled
    2) I do not have PHP-FCGI in the PHP drop down box but I do have Fast CGI. Is this the same? I also have PHP-FPM.
    3) Some of the files in the web directory need wwwrun ownership. But all files in the wp-content folder (for wordpress) are owned by the web user and group. I installed wordpress via FTP using the users credentials so file and folder permissions are as you have stated for most files and folders.

    I did not chmod files to 777.

    But Wordpress.com's Mange feature is still reporting the same thing.

    Autoupdates are not available for [Website]. The file permissions on this host prevent editing files.

    I have switched to both types of PHP with no luck.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    php-fcgi is fastcgi (not cgi). You have a fastcgi ode there when you have ispconfig installed as the fastcgi is the default when you add a new wbesite. Never choose mod_php, this mode is insecure, prevents websites from using the update function and exists only for legacy reasons.

    That's really unlikely as nothing in this site runs as that user, s if you have folders that are owned by wwwrun then these folders prevent a wordpress update. On an ISPConfig server, PHP runs as website user ( e.g. web1, web2, web3 etc.) and not wwwrun.

    To fiy our wordpress install, change ALL files in the web folder to the web[id] user and client [id group of this site and select the fastcgi or php-fpm mode for php.
     
  9. DDArt

    DDArt Member

    I noticed that using php-fpm works in my case and no issues with WPress, if I use anything else I have issues uploading or updating WP and asking for my FTP credentials. This fixes our issue, and having the proper 644/files and 755 directory.. and proper file/directory ownership
     

Share This Page