acl permissions new files.

spacecabbie

Explorer
Joined
Aug 20, 2017
Messages
99
Hi and Hello,

I never seem to properly gasp the whole rights workings on truenas, zo i decided to give up and just setup so that everyone can read and write.
So i have set:
drwxrwxrwx+ 4 nobody guest
This works exactly like i want it's, only thing is new files created are given filerights of the user that writes them.
Is it possible and if so how, to apply above rights and user/group to any file created on that share automatically ?

If not I run a chmod script now every 5 mins to reset the file ownership and permissions is there any harm in pushing this to every 30 sec ?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
If not I run a chmod script now every 5 mins to reset the file ownership and permissions is there any harm in pushing this to every 30 sec ?
chmod and chown will modify the file access data and will set the ACL again even if it's right.

You can use something like this to avoid that:
find . -type f -print0 | xargs -0 chmod 775
find . -type f -print0 | xargs -0 chown user:group

(you can substitute the . with whatever path you want to run it in).

This will put load on your pool, so if you don't have something to handle the metadata (L2ARC setting for metadata only or a special metadata VDEV under TrueNAS), you will see pool activity almost constantly if you run that every 30 seconds.
 
Top