Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007

    php script to search/scan all folders & files with chmod 777

    Hi guys, i know ssh command to search/scan all folders & files with chmod 777 :

    search folder & file
    find / -perm 0777
    search folder only
    find / -type d -perm 0777
    search file only
    find / -type f -perm 0777
    but my shared host not allowing ssh, is there php script to do this? that i can upload & open the file in browser address bar
    Lets be stable diligent person

  2. #2
    Join Date
    Mar 2009
    You can use in your PHP script: backticks (`command`), exec('command', $output), shell_exec('command'), system('command'), passthru('command').
    Some hosts may block them.
    ★ NinjaFirewall : Web Application Firewall for PHP and WordPress.
    ★ NinjaMonitoring : Monitor your website for suspicious activities.

  3. #3
    Most hosts block system, shell_exec PHP functions. It's better you ask them to find such files in your account and provide you the list...
    || Web Hosting Blog - Web Hosting security & latest web hosting industry Announcements
    || Web Hosting Discussion - A Web Hosting community

  4. #4
    Join Date
    Feb 2012
    You can try using fileperms() to check for the permissions and scandir() to list the file/folders in the directory. - fileperms() - scandir()
    WEBUZO - Single User Control Panel for your VPS/Cloud/Server (CentOS/Ubuntu)
    Install NGINX, Apache, MySQL, LAMP, LEMP, PHP, Java and 310+ popular scripts by a CLICK
    Email Server, Database Management, Domain Management, FTP Management, CSF, CRON

  5. #5
    Join Date
    Jul 2007
    if its not possible or too hard, i have another question :
    if using ssh, how to search only inside /home/username/public_html/ , so no search into the root, only inside a folder & the subfolder?

    i tried this, but this is not working :
    find /home/username/public_html/ -perm 0777
    Lets be stable diligent person

Similar Threads

  1. [FEATURED] How to chmod 777 recursively for files underneath a folder?
    By x264-BB in forum Cloud Hosting Offers
    Replies: 24
    Last Post: 12-19-2012, 10:30 AM
  2. Change folders chmod via perl script
    By Scolpy in forum Programming Discussion
    Replies: 2
    Last Post: 05-16-2010, 02:00 PM
  3. Urgent: Folders and Files Permission(chmod) Problem!
    By TheGigabit-West in forum Hosting Security and Technology
    Replies: 3
    Last Post: 10-04-2006, 08:09 AM
  4. loacte and search 777 folders
    By X-x-X in forum Hosting Security and Technology
    Replies: 14
    Last Post: 07-16-2006, 02:21 PM
  5. PHP files altered, chmod 777 .htaccess
    By NetHosted-Andrew in forum Hosting Security and Technology
    Replies: 2
    Last Post: 01-23-2006, 02:37 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