Author Topic: [Tutorial] Easy usersharing with Samba (like (Ubuntu)  (Read 14806 times)

0 Members and 1 Guest are viewing this topic.

Offline MZ250Supa5

  • Neuling
  • *
  • Posts: 26
  • Desktop: Mate
  • GPU Card: Nvidia GTS 450
  • GPU driver: non-free
  • Skill: Intermediate
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #15 on: 14. February 2015, 03:33:33 »
I followed the tutorial to the letter for setting up Samba on my Manjaro Mate box, but I get this error when I try to create a share

Code: [Select]
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershare. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

I went wrong somewhere, I assume, as I can see MYGROUP clearly displayed on the other machines on my home network, but obviously can't see any folders as I am prevented from setting up the shares!

Offline evil5826

  • Neuling
  • *
  • Posts: 12
  • Skill: Novice
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #16 on: 12. March 2015, 21:57:32 »
I followed the tutorial to the letter for setting up Samba on my Manjaro Mate box, but I get this error when I try to create a share

Code: [Select]
'net usershare' returned error 255: net usershare: cannot open usershare directory /var/lib/samba/usershare. Error Permission denied
You do not have permission to create a usershare. Ask your administrator to grant you permissions to create a share.

I went wrong somewhere, I assume, as I can see MYGROUP clearly displayed on the other machines on my home network, but obviously can't see any folders as I am prevented from setting up the shares!


I have had that same issue before. All you need to do is reboot after you have performed the steps in OP.

Offline evil5826

  • Neuling
  • *
  • Posts: 12
  • Skill: Novice
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #17 on: 12. March 2015, 22:01:36 »
Now what I can't get working and is the only thing preventing me from make a full jump to Manjaro/Arch is "Guest access (for people without a user account)" box that when checked does not work. It will not let me in the shared folder.

This is kinda clutch when i need to share a file really quick to any one and then disable it upon will. Seems stupid I know but I use it allot.

Offline evil5826

  • Neuling
  • *
  • Posts: 12
  • Skill: Novice
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #18 on: 16. March 2015, 01:25:43 »
So my guess is when choosing share with guest, the samba attributes are not being applied properly to folder and or parent folder. Ubuntu base distro's work out of the box when sharing a folder with all 3 boxes checked. Arch base distros/forks must do something else. I leave it up to more knowledgeable people to figure out why. I'm still a noob when it comes to this flavour of Linux.

I figured out a temporary fix until some one figures out why samba is broke or works different on arch compared to another distro like LM.

Create a folder in root called "shares". Change owner to you and group of your choice. Make sure the folder attributes are 777, this is the only way it will work. So if you choose share with everyone/guest check mark in sharing tab, it will then work.


Offline Rob

  • Core Team
  • *****
  • Posts: 5390
  • Alias: Korrode
  • Branch: Unstable
  • Desktop: Xfce+Compiz
  • GPU Card: nVidia GTX560Ti
  • GPU driver: non-free
  • Kernel: linux314 x64
  • Skill: Advanced
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #19 on: 16. March 2015, 02:12:45 »
I don't know what DE you're using or whatever, but on Xfce it works fine, and is going to be available OOTB in the 0.9.0 installation media release.

https://forum.manjaro.org/index.php?topic=11810.msg189181#msg189181

Offline evil5826

  • Neuling
  • *
  • Posts: 12
  • Skill: Novice
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #20 on: 16. March 2015, 04:08:16 »
I don't know what DE you're using or whatever, but on Xfce it works fine, and is going to be available OOTB in the 0.9.0 installation media release.

https://forum.manjaro.org/index.php?topic=11810.msg189181#msg189181

People on Unstable branch can test out the thunar-shares-plugin-manjaro package right now.
It's designed so you just install it and then reboot and everything should be working.

Users who installed Manjaro from older installation media may still need to set their home folder readable for other users if they want to share stuff within their home folder.

Thanks Rob that absolutely worked. I am using the Cinnamon version of Manjaro 0.8.11.

Thing is this is also affects other arch releases like Antergos. But 755 will work on that to.

KDE 0.9.0 looking awesome. Probably switch to that.

Offline Rikky

  • Neuling
  • *
  • Posts: 6
  • Work hard, play hard
  • Branch: Testing
  • Desktop: XFCE
  • Skill: Advanced
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #21 on: 26. May 2015, 11:30:33 »
Hello everyone,

Thanks for this tutorial, I can't wait to try it.
I was looking forward for all the possible solution :ssh, aftp, ...

Regards,

 :D
ASUS A6F- Intel Core Duo T2300 / 1.66 GHz Dual Boot Manjaro Win XP - 2 GB RAM - 80 GB

Dell Vostro 131 Win7 / Manjaro 0.8.13.rc1 ascella

Offline Ivanwah

  • Sr. Mitglied
  • ****
  • Posts: 287
  • Branch: Stable
  • Desktop: Cinnamon
  • GPU Card: AMD Radeon HD 6670
  • GPU driver: Free (radeon)
  • Kernel: 4.2
  • Skill: Intermediate
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #22 on: 07. June 2015, 20:30:28 »
I just tried this with OpenRC and I got it to work. Here's what I did:

I followed the tutorial until the point where you enable smbd and nmbd services. Now, since procedure described in the tutorial works only with systemd, I needed to figure out how to do it with OpenRC. First, there is a package called samba-openrc in the official repos, so I installed that (actually, I installed it right after samba). After installation, it tells you to run:
Code: [Select]
rc-update add smb defaultThat is the replacement part for
Code: [Select]
systemctl enable smbd nmbdand
Code: [Select]
systemctl start smbd nmbdSo that's what I did. Instead of those two commands I ran the OpenRC one, and after reboot it works like before. I should probably point out that I only tested Linux to Android sharing since it was the only method possible for me.

In conclusion, it works fine as it is, at least for me. If someone smarter than me knows if I did something wrong and how to to do it properly, your input would be appreciated.

ataulfo

  • Guest
Re: [Tutorial] Easy usersharing with Samba (like (Ubuntu)
« Reply #23 on: 13. July 2015, 08:08:10 »
I do not know if it's a good advice, but system-config-samba form AUR is a simple front end GUI to add shares with user permission.
You can add/remove/modify shared folders  and samba users (but remeber every time to restart samba with)
Code: [Select]
sudo systemctl restart smbd nmbd.
It's also helpful to understand changes in /etc/samba/smb.conf and learn something about samba.
You can also
Code: [Select]
sudo smbstatus -S to see connections.