vendredi 6 mars 2015

setting default permission for directory


Before anyone tags this question as duplicate, I would like to emphasize that I would like to know something extra...


I found a way to set the default file permissions for all files created in a directory


If I apply this procedure to a directory my_dir all the files and subdirectories that will be created inside my_dir will have the correct permission. But if I create a file outside my_dir and then copy or move it inside my_dir, it won't have the permission defined in my_dir.


So I'd like to know if there's a way to fix the permission of a directory and its contents for all files that are inside that directory no matter where the files have been created.


The best solution would be one where the user has nothing special to do. Simple click and drag, copy, cp, mv... but nothing to do with chmod or so. Therefore an answer like this is not really what I'm looking for because the user will have to do something unusual anytime he wants to copy or move a file.


PS: the reason why I'd like to do that is because I share some folders with colleagues who are in the same group as me. I want that anyone in that group has the right to wrx any file contained in the shared folders even if the files have been created outside the folder.



Aucun commentaire:

Enregistrer un commentaire