I would like to automate changing permissions for files copied to a directory. For example, any files copied to folder X should have mode 755, and any files copied to folder Y should have mode 700.
Please advise, thank you!
You can use
7777 -umask = new permissions
for example (linux):
777 -022 755
umask is 022, permissions will be 755 for folders and 644 for files. Put something like
UPDATE (due to a skeptic comment):
I don't believe it possible to do this on a directory-by-directory basis using standard unix permissions. ACLs, however, can do this.