Fixing wordpress file permissions upload file could not be moved & wordpress asking for FTP login

Hello,

 

Many of the wordpress developers/ system admin beginners would have come up to this issue where you will be annoyed with permission issues as mentioned below or you will be prompted to enter FTP logins whenever you upload plugins themes or update wordpress

wordpress media permission issue

This post assumes that you already have a wordpress site and LAMP server using CentOS/Redhat or fedora based OS.

All you need is mod_ruid2 module working to fix these issues.

First let us install all the modules that is required for compiling apache module.

yum group install -y 'Development Tools'

Once done, we will install devel tools for compiling mod_ruid2

yum install -y libcap-devel httpd-devel

Now, let’s download and install mod_ruid2

cd /usr/local/src
wget http://sourceforge.net/projects/mod-ruid/files/mod_ruid2/mod_ruid2-0.9.8.tar.bz2
apxs -a -i -l cap -c mod_ruid2.c

Then let’s open the apache virtual host config file and add the following line below DocumentRoot entry of our website.

RMode stat
    RUidGid steptocloud steptocloud
    RGroups steptocloud

Then let’s restart apache

On CentOS7

systemctl restart httpd.service

On CentOS6 or CentOS5

service httpd restart

Youtube Link

Leave a Reply

Protected by WP Anti Spam