Folder Permissions Inheritance

Status
Not open for further replies.

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
I am trying to figure out how to force newly created files within a directory to gain the permissions in the parent directory. I am thinking ACL's is the solution from a bit of googling, but I am not sure and not familiar with that. More googling im sure would help, but is this what I am looking for?

The reason: I use syncthing to copy data from computer to computer and it appears as though any file it creates gets 755 and I would rather it be 770 like the parent directory. In all honesty, no this isn't a huge issue, I am the only person using the freenas box, but I am using this as a way to learn how all this stuff works. Probably should be learning on a non-"production" box, but I will likely set up a little linux testing environment soon.

Syncthing is running in a jail, so it is running under freebsd, not sure if that means there is an "easy" way for it to adhere to the parent permissions.

Also, I notice that files I manually create are not inheriting permissions either. Is that normal?

Thanks.
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
Were you able to resolve this?

No. Still wondering how you go about implementing this. Other issues have come up and pushed this to the back burner.


Sent from my iPhone using Tapatalk
 

toadman

Guru
Joined
Jun 4, 2013
Messages
619
While I'm not exactly sure how you have things set up, perhaps you can just set a umask for the permissions you want for the user running the syncthing process? That should ensure any new files created are set how you desire.

Or you can access the directory (and sub-directories) via an NFS or SMB share and use ACLs. You should be able to set an inherit flag on those ACLs (I think).
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
While I'm not exactly sure how you have things set up, perhaps you can just set a umask for the permissions you want for the user running the syncthing process? That should ensure any new files created are set how you desire.

Or you can access the directory (and sub-directories) via an NFS or SMB share and use ACLs. You should be able to set an inherit flag on those ACLs (I think).

Hmm, what is a umask?


Sent from my iPhone using Tapatalk
 

LIGISTX

Guru
Joined
Apr 12, 2015
Messages
525
I guess I am confused where I would add the umask.

Would this have to go in the jail somewhere, in the script that starts syncthing itself, or create a syncthing user in FreeNAS and set it there somewhere?

I have read up a lot on this, but I am still mostly confused. Asking on the Syncthing forum they said umask will work and I have the syncthing webui option checked to allow it to be obeyed, I just don't know where I would add the umask code.
 
Status
Not open for further replies.
Top