wordpress file permission + can't auto update plugins

19 posts / 0 new
Last post
#1 Thu, 05/17/2012 - 22:14

wordpress file permission + can't auto update plugins

Hi, I have latest virtualmin installed and php 5.3.3.

I set the php handler to FCGID (default), but I can't update wordpress plugins, it asked my ftp details.

Then I switch to CGI Wrapper, same as above, it asked my ftp details.

I then again tried mod_php (I know the file permission for this must be nobody, which mean at least 776 to work), it also asked my ftp details.

My default file permission for directories are 755 and files are 644.

I migrated from cPanel, in cPanel, it works for above permission in FCGI.

Need urgent help, which part I configure wrongly or what else I need to install or reconfigure.


Thu, 05/17/2012 - 23:12


How is it that you're going about the WordPress update? Do you mean that you're uploading your updates via an FTP client, and that's when you receive the error?

Normally, there's no problem when running Wordpress using CGI/FCGID -- in fact, not running under mod_php actually simplifies it since you don't have to change the file and directory permissions.

One thing you may want to verify is the owner of the files -- if you had done any work as root, for example, that could prevent the files from being writable as your normal user.


Fri, 05/18/2012 - 01:55

the whole virtualmin is solely used by me.

my wordpress work perfectly and normal.

i have mention above, I REPEAT, I've MENTION ABOVE!

when I tried to update plugins, it asked my ftp details.

I CAN'T update normally like when I used in other control panel.

When I used in other control panel like cPanel, Plesk, it can update automatically in wordpress without asking my ftp details.

But here with virtualmin, I can't update it. I have to update via ftp.

If you're using wordpress, then you must know what do I mean.

Fri, 05/18/2012 - 02:10
ronald's picture

I am using wordpress as well. I can update plugins and wordpress without any issue at all.
It never asks ftp info.

per haps there is a restriction on the server or php.ini ?

Fri, 05/18/2012 - 02:22

may I know what kind of restriction on the server ?

or, do you have set .htaccess ?

if yes, what cannot appear in htaccess, so that wordpress can work normally ?

thank you.

Fri, 05/18/2012 - 02:36
ronald's picture

I have a few default wordpress installations. Below is content of the .htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Per haps fopen and/or curl is set to Off in the php.ini file? Im not sure what is used by wordpress to update.

Fri, 05/18/2012 - 03:25

i have both curl and fopen set as On.

should I set to Off ?

Or, what else should I do to get my wordpress auto update plugins work ?

Fri, 05/18/2012 - 03:39
ronald's picture

You should leave those to On
Here is a post you might be interested in, there is a part describing to add info to the wp-configuration file, specifically the ftp credentials

Fri, 05/18/2012 - 03:53

not working for me, i even changed the httpd.conf as in (http://wordpress.org/support/topic/wordpress-cant-write-files-on-its-own...)

but also not work.

I'm tension now.

or it's because of centos 6 with php 5.3.3 ?

i tried to update to php 5.3.13, but I can't find any tutorial, and most info said virtualmin only support 5.3.3


Fri, 05/18/2012 - 11:28

I found the solution finally.

Just change the ownership by clicking the info > user and group changed to username + select apply to directories and all subdirectories

Then it works great.


Wed, 02/20/2013 - 23:48 (Reply to #10)

This thread is a little old but, wjleong15, if you could briefly explain where you started to change this ownership it would be really appreciated. I'm having the same problem. -Rich

Mon, 05/04/2015 - 20:47 (Reply to #11)

I know old thread but I would also appreciate if somebody could briefly explain how to change this ownership in virtualmin

Fri, 05/18/2012 - 15:32
ronald's picture

So you didn't check the owner beforehand as Eric suggested in the first post :)

Sat, 05/19/2012 - 04:03

i checked the owner, but don't get what 100% actually Eric mean.

now I got it.

but it spent me almost half day to change the permission after ownership changed.

because after changed ownership, it changed my permission to 750.


Mon, 05/04/2015 - 22:16
Diabolico's picture

@ronald and everyone else experiencing same problem:

This usually happens when you upload files for virtual server as root. Because all other users what you create with virtual servers dont have permission to change/delete files belonging to root user you will get this error/problem. To fix its really simple, get any software capable of SFTP (like WinSCP - its free), log as root and go to /home/virtualserver-name/public_html/ select all files and change owner and group to user who is admin for that virtual server. In case of WinSCP and multiple files/folders you must turn on "set group owner and permissions recursively" (other software could have same thing under different name) and dont change anything else. Here is the picture how it looks on WinSCP and marked with red what to change: http://i.imgur.com/aMrA4l8.jpg

Other solution is to use SSH and execute "chown -R adminuser:adminuser /home/virtualserver-name/public_html/" where "adminuser" is actual name of the admin account for that virtual server.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Tue, 05/05/2015 - 12:56 (Reply to #15)

Thank You very very much @Diabolico, this is exactly my case, I have transfered and uploaded all worpdress files from my ex. share hosting on Bluehost to a VPS Centos-Virtualmin via SFTP as a root and from that moment I had only problems, googling and by changing permissions via putty I have already achieved wordpress installation and updating plugins, themes run, but now thanks your perfect explanation I know why that happened and what to do next time (I have to upload files as a actual admin of that virtual server). You have also saved me from complete Virtualmin disinstallation because I've asked for a help on fiverr to fix my problem and they told me that I have many problems with permissions and they told me to change Virtualmin with another more friendly cpanel, I am very happy I have refused and resolved it myself.

Tue, 06/13/2017 - 08:19 (Reply to #16)

This solved it. Thanks very much for the clear and concise fix Diabolico!

Experts agree: You rock

I take great pride in my humility.

Tue, 02/23/2016 - 23:49

Thanks to Diabolico
I was adding virtual servers and then installing wordpress remaining logged in as root.
So i was facing problem in wordpress admin panel as it was asking for ftp credentials and file permissions for every single update or editing.
Now i have found two solutions as:
1. After adding virtual server, i should be logged out from "root" account, and should be logged in as newly added virtual server's user to make installation of wordpress etc.
2. If i had made installations already as "root" then i should go to "Webmin>Others>File Manager>/home/virtualserver-name/public_html/" and select all files and folders, Then under "Tools" drop down click on "Chown Selected", change user name and group name to user who is admin for that virtual server (Recursive box should be checked).

Mon, 03/12/2018 - 15:29
Alexei Neboga


Kindly appreciate any help on this issue.

I installed Virtualmin with installer script.

I installed on a minimal and clean grade-A supported OS .

My OS is Centos7.2. I also did the same tests with Centos 6.9.

The FCGI enabled as well.

The Wordpress installed under /home/domainname/public_html.

The owner of the directories where Wordpress needs to write files IS the virtual server owner user, all parent directories starting at /home. Is the same user.

The owner of the domain. T

he permissions set to 755 on all the files of the domain home directory.

Here is the output:

[root@srv public_html]# pwd


[root@srv public_html]# ls -lah

total 208K

drwxr-xr-x 6 example example 4.0K Mar 12 15:51 .

drwxr-xr-x 11 example example 4.0K Mar 12 15:38 ..

-rwxr-xr-x 1 example example 35 Mar 12 15:38 .htaccess

-rwxr-xr-x 1 example example 418 Mar 12 15:37 index.php

-rwxr-xr-x 1 example example 20K Mar 12 15:50 license.txt

-rwxr-xr-x 1 example example 7.3K Mar 12 15:50 readme.html

drwxr-xr-x 2 example example 4.0K Mar 12 15:36 stats

-rwxr-xr-x 1 example example 5.4K Mar 12 15:37 wp-activate.php

drwxr-xr-x 9 example example 4.0K Mar 12 15:37 wp-admin

-rwxr-xr-x 1 example example 364 Mar 12 15:37 wp-blog-header.php

-rwxr-xr-x 1 example example 1.6K Mar 12 15:37 wp-comments-post.php

-rwxr-xr-x 1 example example 3.1K Mar 12 15:37 wp-config.php

-rwxr-xr-x 1 example example 2.8K Mar 12 15:37 wp-config-sample.php

drwxr-xr-x 6 example example 4.0K Mar 12 15:51 wp-content

-rwxr-xr-x 1 example example 3.6K Mar 12 15:37 wp-cron.php

drwxr-xr-x 18 example example 12K Mar 12 15:37 wp-includes

-rwxr-xr-x 1 example example 2.4K Mar 12 15:37 wp-links-opml.php

-rwxr-xr-x 1 example example 3.3K Mar 12 15:37 wp-load.php

-rwxr-xr-x 1 example example 36K Mar 12 15:37 wp-login.php

-rwxr-xr-x 1 example example 7.9K Mar 12 15:37 wp-mail.php

-rwxr-xr-x 1 example example 16K Mar 12 15:37 wp-settings.php

-rwxr-xr-x 1 example example 30K Mar 12 15:37 wp-signup.php

-rwxr-xr-x 1 example example 4.6K Mar 12 15:37 wp-trackback.php

-rwxr-xr-x 1 example example 3.0K Mar 12 15:37 xmlrpc.php

I'm not able to publish the website from wordpress. Error message:

Looks like something’s gone wrong. Wait a couple seconds, and then try again.

Also I'm not able to upload any image on the site.

Here is the error message:

HTTP error.

Please share some light on this.

Alexei Neboga

Topic locked