Possible Duplicate:
FTP and Apache permission issues

i want to create a directory with full permissions (also applies to its "sub folders"). I am using following command:

  sudo chmod 777 -R /opt/www

It sets permissions to existing folder and subfolders only. I want to make it applicable to new files/folder also so that I don't need to type in the same command again and again for new files and folders

marked as duplicate by quanta, MikeyB, Scott Pack, Ward, Michael Hampton Aug 29 '12 at 23:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


NEVER chmod 777. What you need are umask, SUID, SGID.

  • whats the complete syntax? – sandbox Dec 8 '11 at 10:52
  • 3
    @sandbox - Please familiarize yourself with man pages (man man) - ServerFault is not a "gimmeh t3h c0dez" kind of site -- If you have a question about syntax or usage the man page for the command in question should be the first place you look (but feel free to ask additional questions if you find the manual unclear) – voretaq7 Dec 8 '11 at 18:05

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