LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Wordpress showing 403 forbidden (https://www.linuxquestions.org/questions/linux-newbie-8/wordpress-showing-403-forbidden-4175573010/)

jithin10 02-23-2016 07:45 AM

Wordpress showing 403 forbidden
 
Hi,
I have installed wordpress in my my test domain www.example.com ! But while accessing it that is www.example.com/wp-admin/ i get error as Forbidden

You don't have permission to access /wp-admin/ on this server.
I hsve set up .htaccess file properly and made permissions (755 for dir 644 for files) as well. Can somebody help ??:confused::cry:

BW-userx 02-23-2016 08:08 AM

sonnething,I,sa..ed,after,setting,nny,in,house,web,se..er

Code:


Using Unix Groups

Most users will want to be able to modify their content without being root.
The easiest way to achieve this is through the use of Unix Groups; you create
a group to which you add your content editing user, then you add the httpd
user to that group.

Note that this doesn't easilly extend to more than one user who needs to
edit the files, since at that point you need to set Group write on the files.
One would need to use ACL's to achive this.

For example, we have a user "alice" who needs to edit our content, stored
in /var/www/html/

First we create the content group, then we add both alice and apache to it.

# groupadd www-content
# usermod -G www-content <user-name>
# usermod -G www-content apache

Now we need to set the right permissions on our files.

# chown -R alice:web-content /var/www/html
# find /var/www/html -type f -exec chmod 640 {} \;
# find /var/www/html -type d -exec chmod 750 {} \;

What we've done here is to set all files to 640, or rw-r----- and directories
to rwxr-x---. Because the group "web-content" is applied to all the files
and directories, httpd can read these files, but cannot write to them.

Hope,it,helps

the,actual,base,directories,can,be,anywhere,and,na..ed,how,e..er,you,want,thenn
it,is,the,per..issions,that,need,to,be,set,properly,is,all,that,is,really,InnPortant,

ie:
Code:

~/www/html
or
~/website/html/

using,soft,links,if,you,ha..e,to,they,are,useful,too
as,they,nny,or,nnynot,be,needed

I'nn,Keyboard,HandyCapped..:banghead:

Habitual 02-23-2016 08:42 AM

Code:

sudo chmod www-data:www-data /var/www/html -R
Unless your DocumentRoot is non-standard, eg: not in, or under /var/www/ ?


All times are GMT -5. The time now is 10:23 AM.