玄箱+debian-etch+samba&webdav
sambaの設定
インストールして設定ファイル編集。
# apt-get install samba # vi /etc/samba/smb.conf
# diff -u /etc/samba/smb.conf.org /etc/samba/smb.conf --- /etc/samba/smb.conf.org 2008-01-18 21:40:12.000000000 +0900 +++ /etc/samba/smb.conf 2008-01-18 21:54:42.000000000 +0900 @@ -20,6 +20,9 @@ #======================= Global Settings ======================= [global] +charset = CP932 +unix charset = UTF8 +display charset = UTF8 ## Browsing/Identification ### @@ -89,6 +92,7 @@ # /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html # in the samba-doc package for details. ; security = user + security = share # You may wish to use password encryption. See the section on # 'encrypt passwords' in the smb.conf(5) manpage before enabling. @@ -215,27 +219,35 @@ ; winbind enum users = yes #======================= Share Definitions ======================= +[public] +comment = KURO-BOX share directory +path = /mnt/share +public = Yes +read only = No +writable = Yes +force user = www-data +force group = www-data -[homes] - comment = Home Directories - browseable = no +;[homes] +; comment = Home Directories +; browseable = no # By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. - writable = no +; writable = no # File creation mask is set to 0700 for security reasons. If you want to # create files with group=rw permissions, set next parameter to 0775. - create mask = 0700 +; create mask = 0700 # Directory creation mask is set to 0700 for security reasons. If you want to # create dirs. with group=rw permissions, set next parameter to 0775. - directory mask = 0700 +; directory mask = 0700 # Restrict access to home directories # to the one of the authenticated user # This might need tweaking when using external authentication schemes - valid users = %S +; valid users = %S # Un-comment the following and create the netlogon directory for Domain Logons # (you need to configure Samba to act as a domain controller too.) @@ -259,23 +271,23 @@ ; create mask = 0600 ; directory mask = 0700 -[printers] - comment = All Printers - browseable = no - path = /var/spool/samba - printable = yes - public = no - writable = no - create mode = 0700 +;[printers] +; comment = All Printers +; browseable = no +; path = /var/spool/samba +; printable = yes +; public = no +; writable = no +; create mode = 0700 # Windows clients look for this share name as a source of downloadable # printer drivers -[print$] - comment = Printer Drivers - path = /var/lib/samba/printers - browseable = yes - read only = yes - guest ok = no +;[print$] +; comment = Printer Drivers +; path = /var/lib/samba/printers +; browseable = yes +; read only = yes +; guest ok = no # Uncomment to allow remote administration of Windows print drivers. # Replace 'ntadmin' with the name of the group your admin users are # members of.
再起動。
# /etc/init.d/samba restart
webdavの設定
エンコーディングパッケージのインストールと設定。
# apt-get install libapache2-mod-encoding # vi /etc/apache2/mods-available/encoding.conf
# cat /etc/apache2/mods-available/encoding.confEncodingEngine on NormalizeUsername on SetServerEncoding UTF-8 DefaultClientEncoding JA-AUTO-SJIS-MS SJIS AddClientEncoding "cadaver/" EUC-JP
davとencodingの有効化。/shareの設定。
# a2enmod dav # a2enmod dav_fs # a2enmod encoding # vi /etc/apache2/sites-available/default
# diff -u /etc/apache2/sites-available/default.org /etc/apache2/sites-available/default --- /etc/apache2/sites-available/default.org 2008-01-18 22:30:38.000000000 +0900 +++ /etc/apache2/sites-available/default 2008-01-18 22:47:31.000000000 +0900 @@ -28,7 +28,19 @@ AuthUserFile /etc/apache2/dav_svn.passwd Require valid-user </LocationMatch> - + DavLockDB /var/lock/dav/DavLock + Alias /share "/mnt/share" + <Location /share> + DAV on + Options Indexes + Order deny,allow + # <LimitExcept GET HEAD OPTIONS> + AuthType Basic + AuthName "JellyBelly.ddo.jp share" + AuthUserFile /etc/apache2/dav.passwd + Require valid-user + # </LimitExcept> + </Location> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin">
ロックファイル用ディレクトリ作成
# mkdir /var/lock/dav # chown www-data /var/lock/dav
パスワードファイル作成と再起動。
# htpasswd -c /etc/apache2/dav.passwd USER # /etc/init.d/apache2 restart
玄人志向 KURO-BOX/HG NAS組み立てキット
posted with amazlet on 08.01.11