I have partitioned an external HDD on linux (gpt, ext4) and mounted it under /mnt and would like to use it as a storage device for the whole team, meaning everyone would have all permissions to all files even on other Linux machine (unless one changes the ownership and mode manually). If someone creates a new file on their PC, someone else on another PC would also be able to read and write those files. Running sudo chmod -R 774 /mnt/NewDrive/ does the job but not for new files created after running the command. Am I jeopardizing the security of the machine this external HDD is connected to? What is the safest practice?

Finally, how can I set up such an external HDD that functions just like a shareable flash drive?


1 Answer 1


When creating new files, the permissions are calculated from inverse umask, so you need to set umask which is inverted value. So for 774 permission it should be 003 I think

  • 1
    That pointed me in the right direction. I just need to figure out what are all the dmask, umask, etc.
    – Miladiouss
    Aug 9, 2019 at 21:43

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