Results 1 to 3 of 3
  1. #1

    how to make bash script alert permission mode

    Hello guys,
    i have some shared hosting server (whm/cpanel), and many client using wordpress as cms, and they get some phising attack because they not setup permission 777 into more secure permission. So what can i do create bash script to find permission folder/file on my shared hosting and then email warning to client if they have file / folder with permission 777

    someone can help me?

  2. #2
    Join Date
    Nov 2003
    Texas, United States
    You could compile in suPHP using EasyApache. When a PHP script is run from a 777 directory suPHP will throw a server error (perms need to be 755 for directories). It will also throw an error if a script is 777 (they should be 644).
    Tim Benoit
    Stratus4, LLC | Est. 2008 |
    Virtual Data Centers (Cloud) | VPS Servers | Shared Web Hosting
    System Administration | Remote Backups

  3. #3
    Join Date
    Feb 2005
    Quote Originally Posted by nusantara View Post
    they get some phising attack because they not setup permission 777 into more secure permission.
    Access to directories with 777 permissions still requires user-level access to the server so you have at least one malicious user on board, or a user with insecure scripts that malicious users have exploited. And if you're running DSO then the genuine users are forced to use 777 permissions on upload directories - preventing it would be an unreasonable restriction on their usage.

    As tbenoit suggests you could switch to running suPHP which is generally a good idea on shared servers but it will only help to isolate users from each other - you'll still need to address the original problem of the insecure / malicious user account(s).

    "Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them." - Laurence J. Peter

Similar Threads

  1. BASH Script calling Python script
    By stuartornum in forum Programming Discussion
    Replies: 2
    Last Post: 10-10-2012, 11:06 AM
  2. Looking for someone to make a bash script to check lighttpd status
    By Bluz in forum Employment / Job Requests
    Replies: 3
    Last Post: 11-30-2011, 01:11 PM
  3. Replies: 2
    Last Post: 07-17-2011, 09:10 PM
  4. want make backup bash scripts
    By maskmoataz in forum Dedicated Server
    Replies: 3
    Last Post: 11-10-2010, 02:17 PM
  5. bash comman/bash script
    By getbusy in forum Hosting Security and Technology
    Replies: 2
    Last Post: 12-25-2004, 06:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts