LoginSignup
0
2

More than 5 years have passed since last update.

SELinuxが動作している状態で、ドキュメントルート以外をWebdavで書き込み

Posted at

SELinuxが動作している状態で、ドキュメントルート以外をWebdavで書き込みできるようにする。

数時間を要してしまったのでメモします
最終的には認証をつけたが、それ以前の段階で時間を要してしまったので、記録しておくこととしました。

条件
 OSはCentOS7
 ドキュメントルートはデフォルトの/www/var/html
 http://exapmle/dav で参照されたとき /home/dav のファイル一覧を表示 
 SELinuxは起動
 ファイルの書き込みを可とする

Webdav用設定

[/etc/httpd/conf.d/webdav.conf]
Alias /dav/ "/home/dav/"
<IfModule mod_dav.c>
    DAVMinTimeout 600
    DavLockDB "/tmp/DavLock"
    <Location /dav>
          Require all granted
          Options +Indexes
        DAV On
    </Location>
</IfModule>

コンテキストの変更

$ sudo chcon -R -t httpd_sys_rw_content_t /home/dav

 

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2