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

link|improve this question
possible duplicate of FTP and Apache permission issues – quanta Dec 8 '11 at 10:53
feedback

1 Answer

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

link|improve this answer
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
feedback

Your Answer

 
or
required, but never shown

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