ubuntu 10.04下搭建samba文件服务器
Author:gaojinbo
Time:2010-11-25
由于使用文件服务器的人少,权限分配也不太复杂,所以使用samba来替换win2008的文件服务器。10分钟搭建功能强大的samba文件服务器。samba+acl
权限分配:
目录:
1.ylmf
1.项目文档
2.个人文档
3.公共文档
boss 所有权限
public 2,3文件夹读写,1文件夹只读
1.开启acl并重启
vi /etc/fstab
UUID=de8cdf27-39ee-40bd-8b70-dba057d3e351 /fileserver ext4 acl 0 2
apt-get install acl
reboot
2.建立目录
mkdir -p /fileserver/1.ylmf/1.项目文档
mkdir -p /fileserver/1.ylmf/2.个人文档
mkdir -p /fileserver/1.ylmf/3.公共文档
3.添加用户并设置密码
useradd boss -s /usr/sbin/nologin
useradd public -s /usr/sbin/nologin
passwd boss
passwd public
4.设置acl文件访问权限
cd /fileserver/
setfacl -m u:public:rx 1.ylmf
cd 1.ylmf
setfacl -m u:public:rx 1.项目文档
setfacl -m u:public:rwx 2.个人文档
setfacl -m u:public:rwx 3.公共文档
chown -R boss:boss /fileserver/1.ylmf
chmod -R 0750 /fileserver/1.ylmf
5.配置samba
apt-get install samba
vi /etc/samba/smb.conf
#最后添加:
[ylmf]
comment = YLMF File Server by gaojinbo
path = /fileserver
public = no
writeable = yes
create mask = 0600
directory mask = 0700
guest ok = no
6.添加smba用户
smbpasswd -a boss
smbpasswd -a public
密码输入gaojinbo.com
7.重启samba
/etc/init.d/smbd restart
8.访问测试
完成!
Linux主机 PHP主机 Nginx主机 双线Linux服务器
五月 2nd, 2011 at 04:45
Lose Love Handles Fast…
[...]below you’ll see my recommended links page http://www.loselovehandlesfastblog.com/links/ with some excellent websites that I think you should go visit[...]…
六月 24th, 2011 at 21:08
Awesome website…
[...]the time to read or visit the content or sites we have linked to below the[...]……
二月 10th, 2012 at 11:01
[...]we like to honor many other internet sites on the web, even if they aren’t linked to us, by linking to them. Under are some webpages worth checking out[...]……
[...]Here are some of the sites we recommend for our visitors[...]……