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. 解决Eclipse maven servlet-api-2.5.jar jar not loaded问题

    在Eclipse中用maven构建web项目时,如果在pom里写了servlet-api和jsp-api的依赖的话,即使scope为"provided",但在布署到tomcat时, ...

  2. Nodejs --我自己的学习笔记

    对于Nodejs,相信客官并不陌生,网上却已众说纷纭,有人说是一个平台,有人说是服务器JavaScript,有人说一个框架… 之前亦有过研究,多怀可远观而不可亵玩也.高效率,I/O操作,异步编程,以及 ...

  3. Js-Html 前端系列--点击非Div区域隐藏Div

    最近做项目要用到三字码下拉,调用一个插件,但是滚动条不能点击. 后来看另一个插件后突发奇想,在点击其他区域的时候隐藏这个Div就可以了. 背景:输入文字,弹出下拉Div,点击或者拉动Div滚动条选择, ...

  4. C语言之逻辑运算符

    一 逻辑运算符: &&:逻辑与,读作并且 表达式左右两边都为真,那么结果才为真 口诀:一假则假 ||:逻辑或,读作或者 表达式左右两边,有一个为真,那么结果就为真 口诀:一真则真 !: ...

  5. Haskell Seq函数和严格计算

    参考链接http://stackoverflow.com/questions/11046590/the-seq-function-and-strictness https://wiki.haskell ...

  6. C# 中 重载,重写,隐藏的区别

    重载: 就是写多个同名方法,参数个数不同或类型不同或返回值不同 重写:子类中实现的方法必须加override关键词   普通非抽象父类需要virtual 抽象类里面抽象方法abstract 接口的实现 ...

  7. 在Windows上创建同样的Linux操作环境

    在之前的文章中,介绍了我在GNU/Linux图形界面环境下所使用的工具集合.其基本目的是在保证占用最少系统资源的条件下,将电脑操作效率推向极致.这样的工具组合尤如瑞士军刀一般,简洁.高效.功能全面.与 ...

  8. javaee 规范技术

    J2EE的13种核心技术 一.JDBC(Java Database Connectivity) JDBC API为访问不同的数据库提供了一种统一的途径,象ODBC一样,JDBC对开发者屏蔽了一些细节问 ...

  9. IOS开发自定义tableviewcell的注意点😄

    自定义tableviewcell 1.xib,nib拖控件:awakefromnib: 设置2,不拖控件:- (instancetype)initWithStyle:(UITableViewCellS ...

  10. java自带的监控工具VisualVM(二)远程监控

    ps:尝试了网上的几个网友提供的方法,始终不得其法,汇总后,终于尝试成功!将一些需要注意的细节也记录下来以后备用! 我们经常需要对我们的开发的软件做各种测试, 软件对系统资源的使用情况更是不可少, 目 ...