Author Topic: Wordpress and Permissions  (Read 9586 times)

0 Members and 1 Guest are viewing this topic.

Wordpress and Permissions
« on: July 06, 2017, 09:04:19 PM »
I like the project you guys have going.

My issue, which I have been able to correct, is that when I create a domain with user - my directories and files have permissions with nobody:nobody as [owner]:[group]. This results in permissions problems when I use either the FTP or root to transfer files into the public_html file for the user. Permission Denied....

My setup:
Install Method: CentOS 7 x86_64 build 1611 Minimal
Used script from after yum update
Running Web Servers: Apache & Varnish Cache & Nginx Reverse Proxy

Issue: After setting up Domain, User, and SQL database using MySQL Manager; I tried just FTPing the files I needed under the user associated with the domain for Wordpress but was getting Forbidden Access when I tried to run the install.

My solution was to change ownership of the directories with 'chown -R [domainuser]:[domainuser] *' and to change the access permissions modes with 'chmod -R 755 *'

Script string I use from within /home/[user]/public_html:
yum install wget -y && yum install nano -y && wget && tar xfz latest.tar.gz && mv wordpress/* ./ && rmdir ./wordpress/ && rm -f latest.tar.gz && rm -f index.html && rm -f index.htm && cd .. && chmod -R 755 * && chown -R [domainuser]:[domainuser] * && cd public_html && mv wp-config-sample.php wp-config.php && nano wp-config.php && nano /usr/local/php/php.ini

Within php.ini I change these strings:
upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 240

My question is: Do I have to change the ownership every time or is there a better way? Am I maybe doing something wrong? - important because I may wish to create several sites and it's just an extra few steps. I put everything I do just in case I'm messing anything up as I'm not pro, just slightly knowledgeable.
Unrelated: Is CentOS 6 better than 7 right now? Should I upgrade to PHP 7 if my server is light duty for Wordpress?

Re: Wordpress and Permissions
« Reply #1 on: August 02, 2017, 07:12:51 AM »
which account are you using to FTP the files in? are you using root?

It sounds like you need to create the ftp accounts to ftp the files in the home public folders. CWP Dashboard - File Management - FTP Manager V2.

Instead of chowning the files manually, you can click CWP Dashboard - User Accounts - Fix permissions.

Re: Wordpress and Permissions
« Reply #2 on: August 03, 2017, 01:04:22 PM »
to fix user account permissions you need to go in cwp admin area and under User accounts you have Fix permissions which should resolve all permissions issues with your accounts and from then you should be able to upload files via FTP.

CentOS 7 is recommend for CWP so you don't need to change OS.

If you are using ssh for downloading files and running scripts from shell then you should switch to user account by using this command.
Code: [Select]
su - USERNAME -s /bin/bash

VPS & Dedicated server provider with included FREE Managed support for CWP.

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.