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

One comment

  1. Hairstyles says:

    Hey I am so excited I found your weblog, I really found you by accident, while I was researching on Digg for something else, Nonetheless I am here now and would just like to say many thanks for a tremendous post and a all round exciting blog (I also love the theme/design), I don? have time to read through it all at the moment but I have bookmarked it and also included your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the superb work.

Leave a Reply

Protected by WP Anti Spam