Files getting wrong USER when transferred from windows

Joined
May 23, 2016
Messages
19
When I transfer files from my windows PC to one of my SMB shares the files always come in with the wrong USER. I have to change them manually with chown -R. This only happens on one of my SMB shares. All ACL information is the same on all datasets and shares. All USER/GROUP information is the same as well. I'm not sure what I'm missing. The USER has to be the correct or my EMBY server will not see the files. If I run the command ls -l from inside the folder I can see the files are getting the wrong USER for some reason.

Example:

Correct: -rwxrwxrwx+ 1 Plugins media 1001767 Jan 16 2020 [Filename]-fanart.jpg

Incorrect: -rwxrwxrwx+ 1 media media 1001767 Jan 16 2020 [Filename]-fanart.jpg

The permissions and group come through correctly but the USER is always media when I need it to be Plugins and I cant figure out why. Any help would be greatly appreciated.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
When I transfer files from my windows PC to one of my SMB shares the files always come in with the wrong USER. I have to change them manually with chown -R. This only happens on one of my SMB shares. All ACL information is the same on all datasets and shares. All USER/GROUP information is the same as well. I'm not sure what I'm missing. The USER has to be the correct or my EMBY server will not see the files. If I run the command ls -l from inside the folder I can see the files are getting the wrong USER for some reason.

Example:

Correct: -rwxrwxrwx+ 1 Plugins media 1001767 Jan 16 2020 [Filename]-fanart.jpg

Incorrect: -rwxrwxrwx+ 1 media media 1001767 Jan 16 2020 [Filename]-fanart.jpg

The permissions and group come through correctly but the USER is always media when I need it to be Plugins and I cant figure out why. Any help would be greatly appreciated.
What if you setfacl -a 0 u:Plugins:full_set:fd:allow /path/to/share? This will grant the Plugins user full control of any file that's created in the directory. (New ACL calculated on file / dir creation). Owner is determined by user creating files. An explicit entry is not impacted in the same way.

A concrete ACL example from my own plex repository:
Code:
root@homenas[/mnt/dozer/media]# getfacl .
# file: .
# owner: root
# group: wheel
    group:SMBGROUP:rwxpDdaARWc--s:fd-----:allow
         user:plex:rwxpDdaARWcCos:fd-----:allow
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
         everyone@:--------------:fd-----:allow
 
Joined
May 23, 2016
Messages
19
What if you setfacl -a 0 u:Plugins:full_set:fd:allow /path/to/share? This will grant the Plugins user full control of any file that's created in the directory. (New ACL calculated on file / dir creation). Owner is determined by user creating files. An explicit entry is not impacted in the same way.

A concrete ACL example from my own plex repository:
Code:
root@homenas[/mnt/dozer/media]# getfacl .
# file: .
# owner: root
# group: wheel
    group:SMBGROUP:rwxpDdaARWc--s:fd-----:allow
         user:plex:rwxpDdaARWcCos:fd-----:allow
            owner@:rwxpDdaARWcCos:fd-----:allow
            group@:rwxpDdaARWcCos:fd-----:allow
         everyone@:--------------:fd-----:allow

mine look like this:

# file: /mnt/Freenas_4/Movies_4
# owner: Plugins
# group: media
owner@:rwxpDdaARWcCos:fd-----:allow
group@:rwxpDdaARWcCos:fd-----:allow
everyone@:rwxpDdaARWcCos:fd-----:allow
everyone@:--------------:fd-----:allow

all of my other datasets say:
rwxpDdaARWcCo-:fd-----:allow for owner, group & everyone.
and they don't have this line
everyone@:--------------:fd-----:allow

I do not know what each of the letters mean in permissions but I am looking it up now. As the rest of my datasets don't have the "s" at the end.

edit:

I looked up the meaning of each letter. I see that the "s' means synchronize which has nothing to do with the USER being incorrect.
 
Last edited:
Joined
May 23, 2016
Messages
19
setfacl -a 0 u:Plugins:full_set:fd:allow /path/to/share

that worked. thank you for your help and for explaining to me what exactly that command did.

Much appreciated good sir.
 
Last edited:
Top