Way to control Group applied by FTP User?

indivision

Guru
Joined
Jan 4, 2013
Messages
806
I've run into an unusual permissions circumstance.

I have an app that watches an ftp folder. When files are uploaded there, it processes them and then moves them to another folder.

For compatibility, I've set up the destination folder to use the "apps" user and group that the app runs as by default.

The problem is that I don't see a way to control which group the ftp uploaded files get added to. They are owned of course by the ftp user. But, how can I have TrueNAS set their group as "apps" so that the processing app can handle them? (Other than manually)
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Update: I got the above working. (Simply setting the Primary Group for the user).

However, the next issue is that files are uploaded with 660 permissions. Is there a way to control the permissions ftp files are uploaded with?

I tried just updating those with a cron task. That part did work. But, the app (paperless) apparently only checks the files permissions once, then doesn't check again until the app is restarted.
 

indivision

Guru
Joined
Jan 4, 2013
Messages
806
Update 2: I found the file settings options for FTP. However, they don't appear to apply as expected.

In TrueNAS, it seems like the execute permission is ignored. In other words, if you set new files to 775, when they are uploaded they end up being 664. When it was 755 it turned in to 660.

Is this a bug in TrueNAS?

(Made a report for it: https://ixsystems.atlassian.net/browse/NAS-122761 )
 
Last edited:
Top