2

The only user that is able to share the "Public" under their home directory is the original user that was created at installation. Sharing is accomplished through the file manager by right clicking on the Public folder, selecting "Local Network Share" and completing the dialog.

This process fails for any other user created through the GUI for reasons due to "permissions".

  • My question has nothing to do with the use of sharing. The problem is that any attempt to activate sharing of any user's "Public" folder is failing with permissions errors unless that user was the one created during installation of the OS. My current guess is that subsequent users are not created as members of the appropriate group. – Paul Ciosek Nov 27 '19 at 23:08
  • Yes and no. The user was initially created as a non-administrator. Then we tried to share their Public folder and that failed so I switched them to administrator in the GUI. Then we tried again to share the Public folder but that failed again in the same way with permission errors. The user is a member of the group sudo. – Paul Ciosek Nov 28 '19 at 0:23
3

There are 3 issues with sharing of "Public" folder by standard (non-administrator) users

This answer relates to Local Network Sharing of the Public folder within each users "Home" folder, /home/$USER/Public. When one right clicks on this folder and selects Local Network Share One would see this window:

enter image description here

1. First time sharing in this computer

If no one else has ever shared a "Public" folder in this computer, samba will not be installed. The user will see:

enter image description here

On clicking Install Service one gets the prompt to install samba:

enter image description here

This is the first hurdle for the standard user. On clicking install, the user will be prompted to the administrator's password. At this point the administrator can take over and enter the password.

Alternately if the Administrator has already installed samba the standard user will not see these prompts.

2. The user is not a member of sambashare group

When samba is installed in the computer the standard user will see the following error message when they try to enable folder sharing.

enter image description here

The key to this error is the last bit, "You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share."

To share a folder (Public or any other) the standard user has to be a member of the sambashare group. This has to be done by the administrator (someone with sudo privileges). Log out as the standard user and log back in as the administrator. Open a terminal and enter the command:

sudo gpasswd -a johndoe sambashare

where johndoe is to be replaced by the user name of the standard user trying to share the Public folder.

Note: the command is gpasswd emphasis on the g . This command will not change the passoword of the user johndoe. This command will add johndoe to the group sambashare.

Next time the standard user logs in, they will almost be able to share the Public folder.

Note2: If the second user is also an administrator (not a standard user) then that user can use the sudo gpasswd command to add themselves to the group. However, the command will not take effect until the user logs out and logs back in.

3. The sambashare "Public" already exists!

When the standard user logs in and tries again they will see a slightly different error message:

enter image description here

If the standard user gets this error, it means another user (may be the administrator) in this computer has already shared their "Public" folder and used the default share name.

The solution is simple. The standard user needs to change the name of the sambashare in the dialog box like so:

enter image description here

Give an unique share name specific to each standard user, so that when someone accesses the "Public" shared folder they know whose "Public" folder they are accessing.

Hope this helps

| improve this answer | |
  • Adding the user to the group "sambashare" makes it possible for them to share the folder. It is unfortunate that the user, even when created with administrator privileges cannot do this for themselves without intervention from the "original" administrator or without invoking the command line. Nevertheless, thank you for your assistance. – Paul Ciosek Nov 28 '19 at 6:23
  • @PaulCiosek In the answer I have assumed the standard user does not have admin privileges. If the the other users are also administrators (as you have created / edited them to be) then there is no reason they can't do any of the administrative tasks, including those mentioned in the answer. There is a GUI tool to manage groups that is not installed by default. See this question for details. You can install this tool directly from the Ubuntu Software app. – user68186 Nov 28 '19 at 15:47
  • Fell free to move this issue to "discussions" but I wanted to give some background to the matter. – Paul Ciosek Nov 29 '19 at 22:46
  • @PaulCiosek There is no "discussions" section in this site. There is a chat room, but I don't know if you can access it. It m may need some more reputation. We can discuss here in comments and delete the comments later. The other option is for you to edit the question and add the background there. – user68186 Nov 29 '19 at 23:00
  • The site system will automatically suggest moving to chat when the number of comments get large. – user68186 Nov 29 '19 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.