I am getting the following error while running net usershare command.
'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.
How to fix this?
Thanks,
🙂
Best Answer
The directory
/var/lib/samba/usershares
is set up so only root or members of thesambashare
group can read or write to it.That you can't access it (try it by
cd
ing to it) suggests to me that you're not in thesambashare
group. You can test this withid $USER
and assumingusershares
is not in the output, you can fix all this just by running:If you still get error 255 after adding the particular user to the group you might need to reboot.