How to change umask for a files created by application

Posted on

Problem :

I’m using Fatrat ( on a headless server. I would like every file and folder it creates (downloads) to be set with permissions umask 770 , so I can delete it via Samba user which is in the same group as the user that runs the Fatrat application

How can I achieve that?

Solution :

Use the umask command to set the umask before executing Fatrat. umask only changes the umask for the current shell and any commands started from it, so if you are launching Fatrat from a shortcut or window manager keybinding try using sh -c "umask $YOUR_NEW_UMASK; exec fatrat" as the command.

Leave a Reply

Your email address will not be published. Required fields are marked *