Ubuntu | sambaサーバーのインストール
インストール
sudo apt-get install samba
smb.confを編集
sudo gedit /etc/samba/smb.conf
#======================= Global Settings ======================= [global] ## Browsing/Identification ### # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP
↑27行あたりのここに
↓を追加する。
dos charset = CP932 unix charset = UTF-8 display charset = UTF-8 map to guest = Bad User
↓を最終行に追加する。
[share] path = /var/www writeable = yes force create mode = 0666 force directory mode = 0777 guest ok = yes guest only = yes
項目 | 意味 | 備考 |
---|---|---|
path | 共有ディレクトリのパス | 検証用の為、apacheのドキュメントルートを共有ディレクトリに |
writeable | 書き込み許可 | |
force create mode | ファイル作成時のファイルのパーミッション | |
force directory mode | ディレクトリ作成時のディレクトリのパーミッション | |
guest ok | ゲストユーザーを許可する | |
guest only | ゲストユーザーのみ接続可 |
sambaを再起動
sudo /etc/init.d/samba restart