Solved Samba413/Samba416: chdir_current_service: vfs_ChDir() failed: Permission denied. Current token: uid=1003, gid=1003, 2 groups: 1003 1005

I set up a Samba server with samba413 last week, but recently it has been having a strange error. It is unable to connect to a directory in a zpool that has permissions 777. The smbd is also currently running as root. I tried reinstalling and switching from samba413 to samba416 to no avail. Heres everything I have from my most recent attempt.


Code:
  smbd version 4.16.8 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2022
[2023/04/02 00:33:53.926086,  1] ../../source3/profile/profile.c:54(set_profile_level)
  INFO: Profiling turned OFF from pid 44310
[2023/04/02 00:33:55.757157,  1] ../../source3/smbd/files.c:884(file_init_global)
  file_init_global: Information only: requested 113193 open files, 59392 are available.
[2023/04/02 00:34:22.253709,  0] ../../source3/smbd/service.c:171(chdir_current_service)
  chdir_current_service: vfs_ChDir(/media/main) failed: Permission denied. Current token: uid=1003, gid=1003, 2 groups: 1003 1005
[2023/04/02 00:34:22.255929,  0] ../../source3/smbd/service.c:171(chdir_current_service)
  chdir_current_service: vfs_ChDir(/media/main) failed: Permission denied. Current token: uid=1003, gid=1003, 2 groups: 1003 1005

My smb4.conf looks like this
Code:
workgroup = Media
server string = Serveur Média (Samba %v)
server role = standalone server
#smb encrypt = desired

log level = 1

disable netbios = yes
wins support = no
security = user
#min protocol = SMB2

load printers = no
printing = bsd
printcap name = /dev/null

[media]
path = /media/main
valid users = main
writable = yes
browsable = yes
read only = no
guest ok = no
public = no
create mask = 0664
directory mask = 0775
I've been working on this for a few days and its just stumped me. I hope someone knows what the issue is.
 
Code:
drwxrwx---  5 root  wheel  5 Apr  2 16:44 /media
drwxrwxrwx  8 main  samba  9 Mar 31 19:26 /media/main

This is the output
 
Back
Top