您好,登錄后才能下訂單哦!
操作環(huán)境:
兩臺(tái)虛擬機(jī),一臺(tái)安裝samba服務(wù),一臺(tái)安裝samba客戶(hù)端。
-
yum install samba* -y //samba服務(wù) 192.168.80.100
yum install samba-client -y //samba客戶(hù)端192.168.80.101
vi /etc/samba/smb.conf
[database]
comment = this is test file
path = /opt/database
public = yes
read only = yes
writable = yes
write list = jack
create mask = 0644
directory mask = 0777
systemctl restart smb #重啟服務(wù)
smbclient -L //192.168.80.100 -U tom
yum install cifs-utils -y
[root@localhost ~]# mount -t cifs --verbose -o username=tom,password=123 //192.168.80.100/database /opt/aa
mount.cifs kernel mount options: ip=192.168.80.100,unc=\\192.168.80.100\database,user=tom,pass=********
df -hT
如果在目錄里面創(chuàng)建不了文件到80.100上面輸入
chmod 777 /opt/database 因?yàn)闆](méi)有權(quán)限這條命令是給這個(gè)目錄權(quán)限全開(kāi)
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀(guān)點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。