To make samba shard folder permission clear, there are 3 kind of permission need to be paid attention:

1. permission written in /etc/samba/smb.conf of certain folder

2. folder need to be shared by be labeled as samba_shared_t, check by ls -ldZ (Note: needed only while under SElinux environment)

3. folder's own permission according to the login-user. check it by ls -l, best to change the folder's owner by chown.

2 days passed, and I finally find it done with samba server.. with utube

to set up a samba server:

1. install samba;

2. add /etc/samba/smb.conf to the tail: (also if sure about safety of network environment, turn off smb encryption by adding 'smb encrypt = disabled' to [global] section of smb.conf)

[wwt]  # This is the shared folder name displayed in the guest
path = /home/wwt # This is the dest folder in the host
available = yes
valid users = wwt root # space seperated [vital]
writable = yes
write list = wwt root # users guaranteed to write the folder
browseable = yes
public = yes
workgroup = ADMIN # This line is for windows users to login, no use in linux

3. chcon -t samba_share_t /home/wwt -R (Changing SElinux security context)

to make all the folder/file be samba_shared_t.

4. add samba user wwt/root [ the mentioned user wwt in the smb.conf]:

smbpasswd -a wwt
smbpasswd -a root

In linux guest:

smbclient -L 10.0.5.2
smbclient \\\\10.0.5.2\\wwt password

In windows guest:

win-r<CR>
\\10.0.5.2

the test finished.

but if want to put into real work circumstances.. we need yum install cifs-utils:

# first install the mount.cifs tool
mount.cifs //10.0.5.2/wwt /mnt/wwt -o user=wwt,pass=123456
# input the password
cd /mnt/wwt
# done..

------Another need----

We have 1 remote linux server, 1 local linux machine and 1 windows.

The need is to let the local linux sshfs mount the remote linux dir, and let windows access the files through samba service.

Several things to do:

1. the remote linux should have port 22 and sshd service enabled;

2. the local linux machine should sshfs mount the remote dir with option 'allow_other', by:

# Uncomment #user_allow_other in fuse.conf
vim /etc/fuse.conf
# sshfs mount remote dir
sshfs user@machine:/path/to/dir /local/path -C -o allow_other -o umask 0000 -o delay_connect -o reconnect -o IdentityFile=/home/.ssh/id_rsa

3. local linux machine should have samba installed (service port accessible), and configure the /etc/samba/smb.conf (there is no need to restart smbd.service), set user passwd by smbpasswd user...

4. windows side type \\localmachine

Samba: Server setup..的更多相关文章

  1. samba server install

    要求: create vnc service for win7 access it via vnc viewer. 1TB disk for this Centos PC is used as Sam ...

  2. [转]Android与电脑局域网共享之:Samba Server

    大家都有这样的经历,通过我的电脑或网上邻居访问另一台计算机上的共享资源,虽然电脑和手机之间可以有多种数据传输方式,但通过Windows SMB方式进行共享估计使用的人并不是太多,下面我就简单介绍一下, ...

  3. samba server 设置

     samba server  设置yum install samba.x86_64systemctl start smb.servicesystemctl enable smb.servicesamb ...

  4. The Guideline of Setting Up Samba Server on linux(Ubuntu)

    The Guideline of Setting Up Samba Server on linux(Ubuntu) From terminate command window, install the ...

  5. How to configure Samba Server share on Debian 9 Stretch Linux

    Lubos Rendek Debian 13 June 2017 Contents 1. Objective 2. Operating System and Software Versions 3.  ...

  6. How To Configure SAMBA Server And Transfer Files Between Linux & Windows

    If you are reading this article it means you have a network at home or office with Windows and Linux ...

  7. Samba Server possible problem and solving

    Configured samba server at RHEL7, problem encountered and solved. 1, yum install samba*, RHEL7 syste ...

  8. How to install Samba server on Ubuntu 12.04

    Part 1: Configuring anonymous share with samba server To install the samba package,enter the followi ...

  9. CentOS 7 samba server 配置

    samba是linux上的文件共享服务软件,相当与Windows上的共享文件夹,当然也是要在同一网段上的. 当前用的版本是4.4.4,好吧!下面介绍怎么去安装配置它,here we go! 1. 安装 ...

随机推荐

  1. DEV 打印gridcontrl

    private void PrintPreview(DevExpress.XtraPrinting.IPrintable gridControlPrint)         {             ...

  2. mysql基础:数据库的创建,增删改查

    =============查看数据库========================== 使用SHOW语句找出服务器上当前存在什么数据库: mysql> SHOW DATABASES; +--- ...

  3. 从零开始学C++之对象的使用(二):四种对象生存期和作用域、static 用法总结

    一.四种对象生存期和作用域 栈对象 隐含调用构造函数(程序中没有显式调用) 堆对象 隐含调用构造函数(程序中没有显式调用),要显式释放 全局对象.静态全局对象 全局对象的构造先于main函数 已初始化 ...

  4. gcc与g++的区别与联系

    gcc和g++都是GNU(组织)的编译器. 一.误区详解 误区一:gcc只能编译c代码,g++只能编译c++代码 两者都可以,但是请注意: 1.后缀为.c的文件,   gcc把它当作是C程序,而g++ ...

  5. VS2012下基于Glut OpenGL glScissor示例程序:

    剪裁测试用于限制绘制区域.我们可以指定一个矩形的剪裁窗口,当启用剪裁测试后,只有在这个窗口之内的像素才能被绘制,其它像素则会被丢弃.换句话说,无论怎么绘制,剪裁窗口以外的像素将不会被修改.有的朋友可能 ...

  6. MP4视频编码器

    用 HTML5 播放视频,最流行的视频格式非 MP4莫属, 所有最新浏览器都支持; MP4 带有 H.264 视频编码和 AAC 音频编码的 MPEG 4 文件: 以前做过一个把其它编码格式的视频转成 ...

  7. C#中的集合类——HashTable

    HashTable 被称为键值对集合,类似于字典,根据key可以找到value 键值对对象[键]=值;键值对集合当中,键必须是唯一的,而值是可以重复的 1. HashTable的用法 //创建了一个键 ...

  8. 2017 01 16 校内小测 ZXR专场

    我等蒟蒻爆零之后,问LincHpin大爷:“此等神题可有甚么来头?” LincHpin:“此三题皆为当年ZXR前辈所留.” 固名之,ZXR专场,233~~~ T1 勤奋的YouSiki 这个题在BZO ...

  9. js 判断是否为正数

    function validate(num) { var reg = /^\d+(?=\.{0,1}\d+$|$)/   if(reg.test(num)) return true;   return ...

  10. Google Daydream 在中国的第一次演讲摘录

    从 PC.手机到 VR/AR,计算机平台正在迁移,而在这个过程中,与用户使用体验息息相关的「人机交互方式」也将不可避免的发生变化.作为这几波浪潮的弄潮儿,Google 怎么看这种人机交互方式的演进? ...