HowTo: Create Samba Shares Directly from Thunar 您所在的位置:网站首页 拍大麦是什么意思网络用语 HowTo: Create Samba Shares Directly from Thunar

HowTo: Create Samba Shares Directly from Thunar

#HowTo: Create Samba Shares Directly from Thunar| 来源: 网络整理| 查看: 265

Create Samba Shares Directly from Thunar

Once upon a time Thunar had a plugin called thunar-shares-plugin which resembled nautilus-shares in Gnome allowing the user to create samba usershares directly from Thunar itself without using any other utility. Thunar-shares-plugin is broke. It's not offered in Xubuntu because it's broke but it is available in Debian presumably because they don't know it's broke. This is my feeble attempt to bring some of that functionality back to Thunar using "User Custom Actions".

Note: To those who are unfamiliar with this type of share it's what Samba refers to as a "Usershare". It's designed to allow any user to create a samba share of any folder he owns without becoming root. The share definition it creates is not in /etc/samba/smb.conf like Classic- shares but in /var/lib/samba/usershares. For more on userhsares: http://forums.linuxmint.com/viewtopic.php?f=42&t=23169

Linux Mint Debian XFCE Preliminaries.

LMDE needs a little work to get Samba in general and usershares in particular working so if you hadn't done anything to Samba yet I would suggest you look at this part of another HowTo: http://forums.linuxmint.com/viewtopic.p ... 18#p315218

Thunar Shares

Open Thunar and Select Edit > Configure Custom Actions > +

Basic Tab: Name: Samba Public Read Only Command:

Code: Select all

net usershare add %n %f "" Everyone:R guest_ok=y Appearance Conditions Tab: Make sure only Directories is enabled.

Restart Thunar and right click a directory in your home folder, say Documents, and select "Samba Public Read Only". To check if it has done it correctly run the following command to see the share definition:

Code: Select all

net usershare info --long It should look like this if it's done it correctly: [documents] path=/home/altair/Documents comment= usershare_acl=Everyone:R, guest_ok=y I will list all the possible permutations here. Just use the same procedure as outlined above:

Samba Public Read Only

Code: Select all

net usershare add %n %f "" Everyone:R guest_ok=y Samba Public Writeable

Code: Select all

net usershare add %n %f "" Everyone:F guest_ok=y && chmod 777 %f Samba Private Read Only

Code: Select all

net usershare add %n %f "" Everyone:R guest_ok=n Samba Private Writeable

Code: Select all

net usershare add %n %f "" Everyone:F guest_ok=n && chmod 777 %f Samba Share Remove

Code: Select all

net usershare delete %n && chmod 755 %f The use of User Custom Actions that I've outlined above reproduces only half of the functionality of nautilus-shares:

What it can do: Create a samba usershare. Change permissions on the target folder allowing write access to samba clients.

What it can't do: Nautilus-shares and Thunar-shares had a GUI which showed you available options and those you have already selected. Nautilus-shares but not Thunar-shares changed the folder icon to show you that the folder was shared.

Note: My main XFCE based distro is Xubuntu where this works very well. I have enabled it in Mint's LMDE XFCE and it works just as well but I haven't used it that much to know if there are any problems.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有