- Chown the entire /var/www/html hierarchy to root:apache and make it readable for user and group only:
- chown -R root:apache /var/www/html
- chmod -R g-w,o-rwx /var/www/html
- Create (if it doesn’t already exist) and chown /var/www/html/wordpress/wp-content/uploads to apache:apache and make sure it’s user-writable (it should already be):
- mkdir /var/www/html/wordpress/wp-content/uploads
- chown -R apache:apache /var/www/html/wordpress/wp-content/uploads
- chmod -R u+w,g-w,o-rwx /var/www/html/wordpress/wp-content/uploads
- Change the SELinux context of /var/www/hml/wordpress/wp-content/uploads to httpd_sys_rw_content_t:
- chcon -R –type=httpd_sys_rw_content_t /var/www/html/wordpress/wp-content/uploads
- Optionally, make the change permanent, i.e., make it survive a complete file system re-label:
- semanage fcontext -a -t httpd_sys_rw_content_t “/var/www/html/wordpress/wp-content/uploads(/.*)?”
여기서 찾은 자료인데 chown과 chcon 사용법을 비교할 수 있을 것 같다.
댓글 없음:
댓글 쓰기
국정원의 댓글 공작을 지탄합니다.