Unable to create shares

Bug #219892 reported by David Baucum
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu
New
Undecided
Unassigned

Bug Description

In a brand new Hardy install with all the updates, I am unable to create a SAMBA share. These are the steps I took:
1. Right-click the folder I want to share.
2. Click on "Sharing Options"
3. Put a check in "Share this folder"
4. Run through the initial SAMBA installation.
5. Click on the "Create Share" button.
6. An error says, "'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share."

Because I am running under the default Administrator user that is created during the installation, I would expect to be asked for the administrative password and then be allowed to create the share. Being told to "ask your administrator to grant you the permissions" when you are the administrator doesn't make too much sense.

Revision history for this message
David Baucum (maxolasersquad) wrote :
Revision history for this message
Christian Convey (christian-convey) wrote :

I just ran into this also, but I think I know the problem (mostly):

When you first try to share a folder, it offers to install SAMBA. You accept, and it installs SAMBA, and also makes you a member of the group "sambashare". However, until you re-login, your not considered really to be a member of the "sambashare" group. So the real issue here is that you have to log out and back in again before you can share a folder. But a related bug is that the user isn't told about this issue, and instead gets a slightly cryptic error message.

Revision history for this message
David Baucum (maxolasersquad) wrote :

Good call. This does indeed seem to be the issue. The user should be prompt after install that it will be necessary to log out and then back in before shares will be able to be created.

Revision history for this message
muhalifsirin (alperense) wrote :

I have the same problem and let me tell you this, logging in or out does not work for hardy. this bug is still there, and I could not find any way to solve it

Revision history for this message
ZanoZik (zanozik) wrote :

Yeah, good call Christian, worked after relogin as expected, a little reminder in nautilus would be fine too :) In my case, I wasn't able to create a share after relogin right away, because after error 255, I tried to create a share using root (and succeeded, of course, in creating a share for root :D), which was then unavailable for my acc. So, muhalifsirin, maybe that was your case or something similar too?

Revision history for this message
muhalifsirin (alperense) wrote :

My problem is solved now, after I reinstalled samba..But as it is told here, you have to log out first. Also it is still problem to add other users which are created after samba is installed. I had the problem because of this

Revision history for this message
IKT (ikt) wrote :

I also have this issue.

Revision history for this message
Pajarraco (mail-pajarraco) wrote :

I fix it, ubuntu hardy

- goto system>administration>users and groups

- Unlock

- click on Manage Groups

- select sambashare

- click Properties

- unselect and select your user

- click OK

Now I can share my user files

Revision history for this message
David Baucum (maxolasersquad) wrote :

@Pajarraco: This bug has been marked a duplicate of https://bugs.launchpad.net/bugs/212098 That bug correctly identifies the problem. The problem isn't that you can't create shares, it's that when you go to create the share initially, you should be prompted to log out and then back in again. In stead you are simply thrown an error message that is not applicable to the situation.

Revision history for this message
Stijn (stijn.d) wrote :

@ DavidBaucum

Could it be you shared the folder first by using the root account?
Be sure that the root account doesn't share the folder or you will still receive this error.

To check you can use 'sudo nautilus' and go to the shared folder.

Revision history for this message
David Baucum (maxolasersquad) wrote :

@Webshit: No, I created it under the user created during installation. As others have noted, this happens the first time you attempt to share a folder. The solution is to reboot, but the prompts during the first SAMBA setup should indicated this.

Revision history for this message
Yesudeep J Mangalapilly (yesudeep) wrote :

I was facing the same problem however restarting the samba daemon did it for me.

sudo invoke-rc.d samba restart

should fix it for most of you. If it still doesn't work, log out and log back in. If it still
doesn't work, reboot.

Cheers,
Yesudeep.

Revision history for this message
chrispy671 (chris-pangelinan) wrote :

A reboot or login/logout solution didn't work for me. So, I did what pajarraco recommended and it successfully got me to another error message. ;-P
Because I was setting up my system as a file server using Samba in a Windows AD domain, the new error message said that I needed to add ...

usershare owner only = False

to the Global section of smb.conf in order for it to work. Everything worked fine for me afterwards.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.