I want all the new files I create in the directory to have specific permissions, but whenever I create a new file in the directory, it gets the default system permissions even though I used chmod -R before. Is there any way to make my permissions stick for all new files and folders I create in the subdirectory?


1 Answer 1

  • sudo mkdir --mode=define_permissions dir_name
  • sudo chown user_name dir_name
  • touch dir_name/file_name

If this does not work for you, try using ACls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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