TechsRx Logo Top Slice TechsRx Computer Services - Business Stong :: People Friendly
Follow TechsRx on Twitter      TechsRx Facebook Fan Page
TechsRx Logo Bottom Slice Local: 505-897-2996 Toll Free 1.877.TECHS1X (832-4719)
  TechsRx HOME     SUPPORT FORUM        Friday, July 30, 2010 

Set correct permissions on your linux/apache website files and directories

This will help you to easily set correct permissions on your linux/apache website files and directories with one command

As root cd to the ‘document root path’ of your website directory (ie: html, htdocs, httpdocs) and do as follows

find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;

or

find /path/to/docroot/. -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;

this sets all your files to 644 and all your directories to 755

for example,

cd /var/www/html 

find . -type f -exec chmod 644 {} \; && find . -type d -exec chmod 755 {} \;

As found at linux-noob.com

Popularity: 100% [?]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • MySpace
  • StumbleUpon
  • Twitter

Placing Authentication directives directly into httpd.conf instead of using .htaccess

The purpose of using the “distributed configuration file” .htaccess is so that users may control authentication. It can also be set in the Apache configuration file httpd.conf WITHOUT using the .htaccess file. This can improve server performance as the server will not have to look for the .htaccess file in each subdirectory.

<Directory /path/to/public_html/membersonly>
AllowOverride AuthConfig
AuthName "Add message visitors will see here. Keep Out!"
AuthType Basic
AuthUserFile /path/to/public_html/membersonly.htpasswd
AuthGroupFile /dev/null
require user name-of-user
</Directory>

Require user is optional. There is a lot of good information about httpd.conf, .htaccess in a tutorial at this link.
http://www.yolinux.com/TUTORIALS/LinuxTutorialApacheAddingLoginSiteProtection.html

Popularity: 30% [?]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • MySpace
  • StumbleUpon
  • Twitter
transparent pixel spacer
BUY NOW   |    LEARN NOW   |    FIX NOW   |    Web Services & Domains   |    4 Color Printing
transparent pixel spacer