I was having the same issue, I found the solution in another question.
You need to add a force user = parameter. (pick the user carefully, any files created will be owned by this user.)
[Shared]
comment = Allow all users to read/write
path = /home/andrius/Shared
public = yes
guest ok = yes
writable = yes
force user = andrius
Answer from fafrd on Stack ExchangeSamba share acces problem - change_to_user_internal: chdir_current_service() failed!
SMB shares - acces denied when connecting from Win10
centos - Error restarting SAMBA, requires force - Unix & Linux Stack Exchange
User can't access SMB share, samba chdir failure with access denied
I was having the same issue, I found the solution in another question.
You need to add a force user = parameter. (pick the user carefully, any files created will be owned by this user.)
[Shared]
comment = Allow all users to read/write
path = /home/andrius/Shared
public = yes
guest ok = yes
writable = yes
force user = andrius
I had the same issue, but my solution was different: The folder above my smb-shared folder was not readable by samba-user, so the user can't cd into this folder... solution was to give the folder above the right rights.
I FINALLY managed to solve this problem.
first of all i removed the existing connections from windows 10 using net use * /delete from the command line since the credentials where saved and i changed them on the server
also for some reason i had to specify smbpasswd in /etc/samba/smb.conf: passdb backend = smbpasswd in the [global] section
also the /home permission where wrong and all my shares are in /home so i reset the permission to 755: chmod -R 755 /home
then i reset all the shares permission and group access based on my needs.
We had the [NT_STATUS_ACCESS_DENIED] error where users could access their HOME shares but not any other shares.
/var/log/samba/__ffff_172.16.0.35.log:
[2019/03/05 11:26:53.914706, 1] smbd/service.c:678(make_connection_snum) create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
This was caused by Domain Controllers being restarted whilst SAMBA and WINBIND servers were running. Simply restarting services winbind & smb resolved the issue.
A light fix; but worth a mention
SELinux prevents you from running a system service where the binary is in a user's home directory, or in your case, the root user's home directory.
To fix the problem, copy the binary to a proper directory such as /usr/local/bin and call it from there.
I ran in that issue as well. In my case, though, the script I use to start my service is under /usr/bin/..., so clearly not inside a user directory (/home/<name>/... or /root/...).
However, I wanted to have the WorkingDirectory=/home/... defined with the user home directory. That is what caused issue. The CHDIR failed for that service in the same way you mentioned above.
So instead I create a system user with a <package>.sysuser file and corresponding --with sysuser in the debian/rules file.
%:
dh $@ --parallel --with sysuser
The <package>.sysuser file looks like this:
# Create a user "<Name>" and corresponding group "<Name>"
# and create a home directory (a.k.a. /var/lib/<Name>)
#
# see: man dh_sysuser
#
# Name Options
<user-name> home
where <user-name> is my top secret user name. You'll have to install the dh_sysuser extension if you haven't already.
sudo apt-get install dh-sysuser
You may also need that as a dependency in your debian/control file:
Build-Depends: dh-sysuser, ...
Now my system user has a home folder under /var/lib/<user-name>/... and starting a service from there works as expected, no more CHDIR errors.