How do I give permission to a folder in Linux?

Giang Phạm

New member
How do I give permission to a folder in Linux?
Answer
  1. Use chmod -R 755 /opt/lampp/htdocs if you want to change permissions of all files and directories at once.
  2. Use find /opt/lampp/htdocs -type d -exec chmod 755 {} \; if the number of files you are using is very large.
  3. Use chmod 755 $(find /path/to/base/dir -type d) otherwise.
  4. Better to use the first one in any situation.
 

Tìm kiếm

Back
Top