cockpit-file-sharing
cockpit-file-sharing copied to clipboard
Allow custom smb.conf location
This looks like a cool project! I'd like to try it out but my smb.conf file is located at /usr/local/etc/ksmbd/smb.conf
. The syntax is mostly the same as with regular samba. Could this tool be modified to allow custom config file location?
Yup that sounds like it shouldn't be too hard to pull off. In the meantime, ~~you should be good to just create a symbolic link at /etc/samba/smb.conf
and point it to /usr/local/etc/ksmbd/smb.conf
as long as /etc/samba/smb.conf
isn't being used by something else.~~ After trying that, Cockpit's file access API replaces the file atomically when modifying, so the symbolic link will be replaced by a regular file. If you aren't using /etc/samba/smb.conf
for something else, you can just create it with the following content just to make file-sharing happy:
[global]
include = registry
and also put include = registry
in your real smb.conf in the [global]
section to make Samba use the net registry (where file-sharing actually stores its share definitions)
Or you can just put include = registry
in your real smb.conf and ignore the warning message that it's misconfigured until custom config locations are implemented.
Oh cool, I didn’t know about the registry! It sounds like this should work fine since you’re not even using that file. I will test.