Search code examples
windows-servicespermissionssamba

How do I access a Linux Samba share from a Windows Service?


I'm writing a Windows Service in C#. I have a samba share on a linux server that I can browse/read/write from the windows machine, and I have it mapped to a drive letter. The Windows service is running as the SYSTEM user and cannot write to the share.

What should I change?


Solution

  • I used an entry like this in my samba configuration file (smb.conf) to make it writable by any user.

    [myshare]
       comment = My Share
       path = /home/myusername/myshare
       public = yes
       writable = yes
       #maps all users to the nobody user?
       only guest = yes