How does folder share work

Ubuntu Support Template

Ubuntu Version:
22.04 LTS

I use ubuntu in graphic mode but I am willing to move to text mode and let the PC serve media files.

I have a mount set i9nmy fstab file, so in text mode ubuntu will mount it, the question is…

I use to share a folder from the file manager, right click, and share

I though this would write the changes to /etc/samba/smb.conf but it does not, so I think that in text mode the share will not exist, how do I have to do to have the share enabled both, in text and graphic mode?

Like most files in /etc the Samba configuration is not writeable for a normal user. Unless something changed since I last used mainline Ubuntu, sharing a folder from the file manager does the equivalent of a net usershare add ... command. The configuration(s) for user shares are not stored in /usr/local/samba/lib/usershares/ as the manual page for ‘net’ states but in /var/lib/samba/usershares/. You can check whether the shares you create are usershares and are accessible by running net usershare list.

running

net usershare list

outputs the only folder I intend to share in text mode, does this mean that in text mode will still be shared?

Not quite sure what you mean by ‘text mode’ ; do you mean running the system without a GUI (like a server …) or do you mean in a terminal ?
Anyway, I believe it should work in both.

1 Like

wel, my fault, what I mean is with no GUI

This topic was automatically closed after 30 days. New replies are no longer allowed.