I know that one should avoid setting file/folder permissions to 777 and instead use a more granular approach.

I would like to know, if there are specific cases when using chmod 777 on a webserver is justified.

closed as not a real question by Bill Weiss, EightBitTony, voretaq7 Jul 24 '12 at 15:40

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    chmod 777 on what? i.e. a directory in the web server path, or somewhere else. Without a specific example, the only possible answer is one of 'maybe' or 'possibly' or 'probably'. – EightBitTony Jun 6 '12 at 11:31
  • 2
    In which situation are you really interested? There are going to be different answers depending on what environment you're in (corporate, small business, public facing server, personal VM, etc). – squillman Jun 6 '12 at 11:38
  • 2
    If you are struggling to find valid cases, then surely you've already answered your question – symcbean Jun 6 '12 at 12:11

No. There are always ways to tighten up permissions appropriately.

  • 2
    If you have a directory to which everyone in the universe genuinely needs full access, then 777 is justified. I think it's naive to say it's never required. Sure, it should be unusual and by exception only, but it's not inconceivable. – EightBitTony Jun 6 '12 at 11:32
  • 1
    On a web server? Again, better ways. – Ignacio Vazquez-Abrams Jun 6 '12 at 11:35
  • @EightBitTony: Even then, the directory should probably be set to 1777 like /tmp/ or /var/tmp/. The sticky bit allows a world-writable directory, while preventing users from deleting each others' files. (If the users trust each other so much that they should delete each others' files, then they should probably get their own group and a 0770 directory to play in.) – Kevin J. Chase Jun 10 '16 at 11:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.