Lunarpages Web Hosting Forum

Author Topic: How to Fix Disk Permissions  (Read 2881 times)

Offline Mitch

  • Berserker Poster
  • *****
  • Posts: 12634
    • MitchKeeler.com
How to Fix Disk Permissions
« on: November 02, 2009, 09:44:50 AM »
I am going to be covering a couple of other LPCP tutorials in the next newsletter (coming soon, I promise!) however, until then I wanted to share with you the tutorial I got written up about the "Fix Disk Permissions" tool that is built right into the LPCP control panel.  This will allow you to quickly fix folder and php file permissions back to the way they should be.  You can check it out here:

Read Fix Disk Permissions via the Web Hosting Wiki!

Remember, to keep those tutorial suggestions coming!  The more ideas I get from all of you, the better of a resource the Lunarpages web hosting wiki will become!
New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6399
Re: How to Fix Disk Permissions
« Reply #1 on: November 14, 2009, 03:05:37 PM »
"Reset Permissions" would probably be a better label than "Fix Permissions". I would be concerned about people who don't know what they're doing, going and "fixing" their permissions such that read-only files (e.g., Settings.php in SMF) get reset to read-write. Can I assume that under LPCP, suPHP will still be running and blocking "world writable" files and directories? Maybe (future feature) you could have a "Check Permissions" or "Analyze Permissions" button that would tell you what changes "Fix/Reset" would make, and give you a chance to change your mind, or select/deselect items to be changed (e.g., you want to keep Settings.php read-only). Also, "Fix/Reset" might just leave read-only files alone.

I've heard of some applications (osCommerce?) setting backups of modified files to 1411. If true, I don't know just why they do that (400 would be better), but "Fix/Reset" might mess up something.

If suPHP is still running, how about either automatically removing "world writable" permissions when encountered, or doing it when files are scanned for other purposes? Is there ever any legitimate reason to have them? Some applications such as SMF and osCommerce have a habit of making certain directories 777 (due to the ignorance of their authors). I can see that something in the application might scan files or directories and reset them to the banned permissions -- in that case you should either just fix them once, or email the user with a warning about what's going on. I don't know if it's practical to modify chmod or other tools and system calls used to change permissions, to ignore requests to make a file or directory "world writable".

While on the subject of changing permissions, I hope that your interface will be improved over cPanel's. In cPanel, a lot of people are confused and change the numbers of the permissions, rather than checking/unchecking boxes. This has no effect when saving the changes. Either make the numeric permissions "read-only", so they can't be overwritten at all, or accept either box checks or number overwrites. You could accept both kinds of changes at once, but you'd have to check for conflicting results.

Just some ramblings from someone who hasn't had hands-on experience yet, so some of this may not be applicable.
Visit My Site

E-mail Me
-= From the ashes shall rise a sooty tern =-