1

All of the folders I set as a locale network share by right clicking on a folder and selecting local network share, (which is the third method listed below to set a share) revert back to an unshared folder when ever the system is shut down and restarted? What causes this, and how do I prevent it from happening?

Just to add a little more information: I am running Ubuntu Desktop 16.04

As I understand it there are three ways to create a shared folder.

  1. creating it manually in the smb.conf file
  2. using the Samba GUI (system-config-samba) which edits the smb.conf file for you, or
  3. by right clicking on a folder and selecting local network share, selecting share this folder and allow others to create and delete files in this folder, and clicking on create share. The folder is then changed to a shared folder which displays the two arrows on it.
    (as Elder Geek has stated, this method does not update the smb.conf file, which answers why the folder does not remain shared)

I believe the folder is no longer shared after restarting for two reasons;

  1. first when I restart the computer and then check the folder (which in this case resides on my desktop) by right clicking and selecting locale network share, the folder is no longer marked as shared, and
  2. second, I can not access the shared folder from other computers called out under the share in the smb.conf file as seen below:
    (I believe this to be caused by some other reason as posted in my other questions listed below)

Here is the updated share in my smb.conf as set by the Samba GUI:

[Shared]  
path = /home/craig/Desktop/Shared  
writeable = yes  
valid users = craig-pc, craig, marcy  

Not being able to access the shared folder is the problem which prompted me to ask in what file is the information stored to begin with. I have described this problem in much greater detail in the following other questions I have asked on this forum:

1 Can not access Ubuntu shared folders from windows computer

2 Multible smb.conf files

3 Not showing up on network after running system-config-samba

4 Can not access Ubuntu shared folders from windows computer

1
  • Please edit additional information into your question as comments can be deleted for various reasons. How did you determine the folder is no longer shared when you restart?
    – Elder Geek
    Mar 2, 2017 at 23:18

1 Answer 1

1

In answering your related question I discovered that /etc/samba/smb.conf isn't modified when you setup a locale share as in that question. The reason this doesn't persist is that when the samba daemons start they look to /etc/samba/smb.conf for information on what shares to expose. Since this doesn't appear to be modified when selecting a folder to share via the GUI, the change doesn't persist. Whether this is a bug or a feature depends on your perspective.

To setup a permanent share you'll need to edit /etc/samba/smb.conf

Here's an example that you can modify to fit your requirements:

[global]
    workgroup = METRAN
    encrypt passwords = yes
    wins support = yes
    log level = 1 
    max log size = 1000
    read only = no
[homes] 
    browsable = no
    map archive = yes
[printers] 
    path = /var/tmp
    printable = yes
    min print space = 2000
[test]
    browsable = yes
    read only = yes
    path = /usr/local/samba/tmp

For further documentation on Samba see https://www.samba.org/samba/docs/

Sources:

https://askubuntu.com/a/888857/225694

https://www.samba.org/samba/docs/

2
  • Comments don't format very well. Please edit your smb.conf file into your post or if it's too long, provide a link to a pastebin of the content. Thank you!
    – Elder Geek
    Mar 2, 2017 at 23:21
  • Thank you Elder Geek for your comment. Being new to Ubuntu I need to learn the correct procedures, and it is with the kind help of other users such as yourself I will do so much quicker. Could I kindly ask you to please take a look at my updated question and see if you can help me out with my problem of not being able to access my shared folders. Mar 8, 2017 at 11:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .