'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error Permission denied

Asked by unleash on 2008-05-03

You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

Question information

Language:
Spanish (Spain) Edit question
Status:
Answered
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Last query:
2008-05-03
Last reply:
2012-09-13

Please open a Terminal from the menu Applications->Accessories->Terminal and copy and paste here the result of:

id

command

Thank you

Bhavani Shankar (bhavi) said : #2

Hello unleash

this is a well known bug in ubuntu ref:

https://bugs.edge.launchpad.net/ubuntu/+source/nautilus-share/+bug/212098

(and its under progress)

Has a duplicate also as the problem as yours

https://bugs.edge.launchpad.net/ubuntu/+bug/219892

As described in one of the comments there

[Quote]

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

[Quote]

So try it out and if you are still having a problem please feel free to add a comment there..

Regards

Bhavani Shankar.

Lennart Hansen (lahansen) said : #3

You should be able to use the following command instead of re-login.

$ newgrp sambashare

goslackware (goslackware) said : #4

I did:
$ newgrp sambashare
$ id
and I saw that it shows me part of the sambashare group, but I was still not able to create the share

Only after logging out then back in could I then be able to do it.

goslackware (goslackware) said : #5

.

bhoy (bhoy302003) said : #6

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.

bhoy (bhoy302003) said : #7

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.

Celestika6 (sexy-weirdo) said : #8

I'm having the same damned problem! Here's the thing... I'm root.

richarde (richard-eibrand) said : #9

Hi,

I had the same problem on a machine I had upgraded. I had a look at the permissions on the folder

drwxrwx--T 2 root Debian-exim 4096 2008-05-25 19:52 usershares

I then looked at a fresh install box I have, and the permissions were:

drwxrwx--T 2 root sambashare 4096 2009-02-05 12:35 usershares

A simple chown root:sambashare on the /var/lib/samba/usershares

Allowed me to share directories without getting the annoying "net usershare' returned error 25" error message.

R

kinkajou45 (kinkajou45) said : #10

I am experiencing the same circumstances as Celestika6 . In order to use nautilus, I had to go back into terminal as -s. I am root and the only user of this machine.

I tried the log out/in, reinstalls with no success. I am receiving a warning in terminal after using the fix above:
usr@Ti-Jacques:~$ newgrp sambashare
usr@Ti-Jacques:~$ id
uid=1000(usr) gid=124(sambashare) groups=4(adm),20(dialout),24(cdrom),46(plugdev),108(lpadmin),123(admin),124(sambashare),1000(carol)
usr@Ti-Jacques:~$

nautilus-Share-Message: Called "net usershare info" but it failed: 'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershares. Error No such file or directory
Please ask your system administrator to enable user sharing.

--- Hash table keys for warning below:
--> file:///usr
--> file:///usr/share/applications/screensavers
--> file:///root
--> file:///usr/share/applications
--> file:///usr/share
--> file:///

(nautilus:5574): Eel-WARNING **: "nautilus-metafile.c: metafiles" hash table still has 6 elements at quit time (keys above)

(nautilus:5574): Eel-WARNING **: "nautilus-directory.c: directories" hash table still has 6 elements at quit time
seahorse nautilus module shutdown
root@Ti-Jacques:~#

René Pärts (renep) said : #11

I also had a lot of headacke with this one, but "chown root:sambashare on the /var/lib/samba/usershare" did the trick. Thank you richarde!

Jem Fleming (jemfleming) said : #12

Don't know if this is related, but this problem came up while I was browsing ~/.mozilla to find out what was causing a problem rsync-ing my home folder to USB (I use Ubuntu 9.10).. the rsync problem seemed due to something big & dodgy in ~/.mozilla; $ sudo rm -R .mozilla cleared the rsync problem completely (I had to start from scratch again with Firefox of course, but -hey- I can backup properly again :) - and I haven't had this "error 255 problem since"..

I don't know but I solved the problem by creating a folder under /var/lib/samba/ named usershares and then used the command

chown root:sambashare on the /var/lib/samba/usershares

by the way i was instantiating nautilus as sudo nautilus when the message came.

Hope it helps.

Theodotos Andreou (theodotos) said : #14

I solved the problem by adding myself to the sambashare group:

$ sudo usermod -a -G sambashare user

You need to logout and login again in order to work

Can you help with this problem?

Provide an answer of your own, or ask unleash for more information if necessary.

To post a message you must log in.