We are working on CentOS and our data servers are running FreeNAS. We have a few shared projects automounted in /shared_projects folder.

Each times a user delete a file in those shared projects, it results in the creation of a .Trash-uid folder at the root of this specific project. This means that we can have a lot of .Trash-* folder in all those shared projects. This can become a real mess.


Cleaning all those folders requires a lot of time since permissions of those trashes are owner only. Each time we want to clean those, we need to ssh as root onto the specific server, remove those file. Same for next server...

Is there a way to force a different umask for those Trash folders? That will allow us to clean them from one workstation without root permissions.

EDIT: Umask is already set for all users to 0002 but trashes don't follow it. Projects are shared through NFS.

1 Answer 1


How file are pushed/deleted from the FreeNAS by users ?

If it's by mounting it locally (using NFS, CIFS or any other remote filesystem), then you have to configure the umask on each workstation. You may also simply disable the trash feature, see this link

If it's using a service running on FreeNAS (FTP/sFTP/...), then you have to set the umask before starting the service.

Instead of trying to fix the umask, you would better create a cron task to automatize the cleanup of these directories.

  • Thank you for your answer. In fact, it's shared by NFS FreeNAS service. Umask is properly setted for all users but not respected for trashes. Cron is a solution, that's true but I would prefer open permissions. Oct 16, 2019 at 13:48
  • Can you clarify "Umask is properly setted for all users" ? Where is it set ?
    – binarym
    Oct 16, 2019 at 13:50
  • Yes, all users source the same setup and umask is set in it. Oct 16, 2019 at 14:01
  • Maybe you can force umask on the mountpoint directly into the /etc/fstab ...
    – binarym
    Oct 16, 2019 at 14:03
  • I've just tested it and it's not solving the problem. It looks like trashes are ignoring umask. Oct 16, 2019 at 14:19

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.