Folder Redirection (Error 0x1001/0x9001) on NS8 Samba - Works for Domain Admin, fails for regular user

Oto kompletna treść posta w języku angielskim, gotowa do skopiowania i wklejenia na forum community.nethserver.org. Zawiera wszystkie techniczne szczegóły, które wspólnie ustaliliśmy.


Subject: Folder Redirection (Error 0x1001/0x9001) on NS8 Samba - Works for Domain Admin, fails for regular user

Hi everyone,

I’m struggling with Folder Redirection GPO on NethServer 8 (running on Rocky Linux host). I’ve reached a point where the user folder is created, but the redirection fails with errors 0x1001 and 0x9001 in Windows Event Viewer for regular users.

My Setup:

  • Server: NethServer 8 (Stable) on Rocky Linux.

  • Client: Windows 11 Pro joined to the domain.

  • GPO Path: \\192.168.0.53\profil\%USERNAME%

  • GPO Settings: “Grant exclusive rights” is OFF, “Move contents” is OFF (for testing).

The Behavior:

  • As Domain Administrator: Folder Redirection works perfectly. Folders are created, and the policy applies without any issues.

  • As Regular User (e.g., “szymon2”): The system successfully creates the folder \\192.168.0.53\profil\szymon2, but the redirection fails. The subfolder remains empty (no Desktop/Documents folders inside) and the user gets “Access Denied” when trying to enter their own folder.

Windows Event Viewer shows: “Failed to apply policy. Error: Can’t copy files… ErrorDetails: The copy function cannot be used.” (Error 502 / 0x1001).

Current Share ACLs (as seen from Windows):

  • NT AUTHORITY\SYSTEM: Full access

  • NT AUTHORITY\NETWORK: Special

  • Users: Full access

  • Domain Users: Full access

  • BUILTIN\Administrators: Full access

Current Permissions on Rocky Linux (host): The shared directory profil has the following attributes (note the ID 1005 which seems to be the mapped ID for domain users):

Bash

# ls -ln
drwxrwsr-x+ 1005 1005 profil

# getfacl profil
# file: profil
# owner: 1005
# group: 1005
# flags: -s-
user::rwx
group::rwx
group:1005:rwx
mask::rwx
other::r-x
default:user::rwx
default:group::rwx
default:group:1005:rwx
default:mask::rwx
default:other::---

What I’ve tried so far:

  1. Resetting the CSC cache on Windows (FormatDatabase registry key).

  2. Setting chmod 777 and chown 1005:1005 on the host.

  3. Forcing inheritance from the parent profil folder via Windows Advanced Security tab.

It seems like when a regular user creates the directory via GPO, the resulting permissions/ownership are not being set correctly by the NS8 Samba container (unlike for the Administrator).

Has anyone successfully configured Folder Redirection on NS8 for regular users? Are there any specific VFS settings or smb.conf tweaks needed to handle subfolder creation and ownership properly?

Thanks in advance for any help!

Hi,

welcome to the NethServer community.

I never tested folder redirection with Samba but I found the following in the Samba wiki:

If you choose to set these options differently and run into problems such as Event ID 502 in the application event log when a user logs in, see this Microsoft support article which boils down to either setting both Grant user exclusive and Also apply to Windows 2000 or neither of them.

"Thank you for your answer. I have already tested this before, but unfortunately, it doesn’t help at all. I have found one more “clue” – here are the extended attributes for the problematic folder:

Bash

# getfattr -d profil/szymon2
# file: profil/szymon2
user.DOSATTRIB=0sAAAFAAUAAAARAAAAEAAAAM7PGDiQhdwB
user.NTACL=0sAwADAAAAAgAEAAIAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABABSEZAAAAIAAAAAAAAAAnAAAAAEFAAAAAAAFFQAAAL2AOeymU8MgV2xarvQBAAABBQAAAAAABRUAAAC9gDnsplPDIFdsWq4BAgAABABYAAMAAAAAExQA/wEfAAEBAAAAAAAFEgAAAAATGAD/AR8AAQIAAAAAAAUgAAAAIAIAAAATJAC/ARMAAQUAAAAAAAUVAAAAvYA57KZTwyBXbFquQAYAAA==

I’m not sure if this helps, but it shows how Samba is storing the NTACLs on the filesystem. Any further advice would be greatly appreciated."

Maybe the profile share needs to be configured as explained in the Samba wiki?

It’s possible to add share options using net conf, see for example Recycle Bin Samba NS8 - #4 by mrmarkuz

net conf setparm profil "csc policy" disable