• Home
  • The Song
  • The Avatar
  • The Cat
  • Contact the Cat

Gyp the Cat dot Com

WordPress not Updating – Asking for FTP Details – Fixed
internet

WordPress not Updating – Asking for FTP Details – Fixed

I was asked to have a look at a particular problem on a WordPress site, where nothing was auto updating at the click of the appropriate button, it was going and asking for FTP details that we didn’t have and shouldn’t have even needed.

Firstly I made sure that the wp-content director had permissions as 755, it did, and still not working.

It transpires that there was another problem in that the directories were not owned by process running Apache.

Logon to your Ubuntu box via SSh.

Type in the following:

ps aux | grep ‘apache’

You should be looking at something like this:

[email protected]:/# ps aux | grep ‘apache’
root 2233 0.0 2.3 44900 12032 ? Ss Jul21 1:37 /usr/sbin/apache2 -k start
www-data 3536 0.0 6.1 66468 31244 ? S Aug12 0:08 /usr/sbin/apache2 -k start
www-data 4043 0.0 6.3 66884 32512 ? S Aug12 0:11 /usr/sbin/apache2 -k start
www-data 4376 0.0 5.6 64156 28832 ? S Aug12 0:07 /usr/sbin/apache2 -k start
www-data 5205 0.0 6.4 67988 32892 ? S Aug12 0:10 /usr/sbin/apache2 -k start
www-data 7051 0.0 5.5 63664 28272 ? S Aug12 0:04 /usr/sbin/apache2 -k start
www-data 9724 0.0 6.4 68040 32884 ? S 05:41 0:02 /usr/sbin/apache2 -k start
www-data 10130 0.0 4.7 60648 24204 ? S 06:28 0:00 /usr/sbin/apache2 -k start
www-data 10554 0.0 5.4 63600 27780 ? S 07:32 0:01 /usr/sbin/apache2 -k start
www-data 10968 0.0 1.0 44900 5576 ? S 08:34 0:00 /usr/sbin/apache2 -k start
www-data 10992 0.0 1.0 44900 5332 ? S 08:35 0:00 /usr/sbin/apache2 -k start

This will tell us who the Apache service is running as, in our case it’s running as www-data user.  Now we need to know the UID of the user, type in:

id www-data

You should see something like:

[email protected]:/# id www-data

uid=33(www-data) gid=33(www-data) groups=33(www-data)

Excellent, we’ve got all we need, now we need to update the permission WordPress is using with the chown command, like this:

chown -hR [user]:[group] /path/to/http/directory

So:

chown -hR www-data:www-data /var/companya.com/httpdocs

Or:

chown -hR 33:33 /var/companya.com/httpdocs

Leave that command to run, and you’re all done.  Log back onto WordPress, and update freely.

Wordpress Successful Updates
Wordpress Successful Updates

Related

Written by gyp - August 13, 2011 - 1744 Views
Tags | apache2, linux, wordpress

You Might Also Like

Securing WordPress from Brute Force Attacks by Country Blocking on Nginx

July 11, 2015

How to Create a Site to Host VPN on Ubuntu for AWS, Azure and Linode with pfsense

October 3, 2015

Useful SSH Commands (Including Mac OSX)

June 20, 2013

1 Comment

  • How to Install Wordpress with SSH and Nginx | Gyp the Cat dot Com July 12, 2012 at 9:51 pm

    […] make sure that the WordPress permissions are comfortable. chown -hR […]

    Reply
  • Please Post Your Comments & Reviews
    Cancel reply

    Your email address will not be published. Required fields are marked *

    Previous Post
    Next Post

    Latest Posts

    • Monitoring Tor Usage in Azure Sentinel, ASC, MDATP and ALA
    • HTTP to HTTPS Redirect on Azure CDN
    • Strongswan IPSec (Including Cryptomap) to Microsoft Azure Virtual Network Gateway
    • Black Ops 3 NAT Type Strict & PS4 NAT Type 3 with pfSense Fixed!
    • Sorry for the lack of posts
    • How to Block Internet Access with Group Policy (GPO)
    • Enforcing Microsoft Office 365 and Azure Tennancy with McAfee Web Gateway (MWG)
    • Scanning Subnet for Issuing Certificate Authority with OpenSSL
    • How to Configure Windows 2012 NPS for Radius Authentication with Ubiquiti Unifi
    • Steam & Valve IP Ranges

    Top Posts & Pages

    • How to Block Internet Access with Group Policy (GPO)
      How to Block Internet Access with Group Policy (GPO)
    • IPSec VPN Host to Host on Ubuntu 14.04 with strongSwan
      IPSec VPN Host to Host on Ubuntu 14.04 with strongSwan
    • How to Configure Windows 2012 NPS for Radius Authentication with Ubiquiti Unifi
      How to Configure Windows 2012 NPS for Radius Authentication with Ubiquiti Unifi
    • Tinyproxy A Quick and Easy Proxy Server on Ubuntu
      Tinyproxy A Quick and Easy Proxy Server on Ubuntu
    • ISEB Business Analysis (BA) Revision Notes
      ISEB Business Analysis (BA) Revision Notes
    • How to Log BIND Queries on Ubuntu 12.10
      How to Log BIND Queries on Ubuntu 12.10
    • Steam & Valve IP Ranges
      Steam & Valve IP Ranges
    • HTTP to HTTPS Redirect on Azure CDN
      HTTP to HTTPS Redirect on Azure CDN
    • Monitoring Tor Usage in Azure Sentinel, ASC, MDATP and ALA
      Monitoring Tor Usage in Azure Sentinel, ASC, MDATP and ALA

    Tags

    apache2 azure azure log analytics blops business centos cheating cissp cloudflare cryptography dns game google gyp internet iphone ipsec isc linux mac marketing microsoft mw2 mx mysql nginx pfsense postfix proxy ps3 qualification radius revision security seo smtp socks squid ssh strongswan tinyproxy ubuntu windows 2012 wordpress xdecrypt.com
    Gyp the Cat dot Com

    Some rights retained Gyp the Cat Dot Com