I have an uploads folder for my web application: /disk2/app/uploads
.
ls -Z returns:
drw-r--r--. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 uploads
ls -Z /
returns:
drwxrwxrwx. root root system_u:object_r:file_t:s0 disk2
ls -Z /disk2
returns:
drwxr-xr-x. apache apache unconfined_u:object_r:file_t:s0 app
much of which I got from here
when I run is_writable('/disk2/app/uploads')
in php it returns false
I have tried every possibility I can think of to figure it out.
Relevant audit logs:
type=AVC msg=audit(1510944045.012:202923): avc: denied { getattr } for pid=14017 comm="httpd" path="/disk2/app/uploads/12222/206/1496103427-20170526_151922.jpg" dev=sdb ino=17826039 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:file_t:s0 tclass=file
type=AVC msg=audit(1510944045.012:202924): avc: denied { write } for pid=14017 comm="httpd" name="uploads" dev=sdb ino=2097155 scontext=unconfined_u:system_r:httpd_t:s0 tcontext=unconfined_u:object_r:file_t:s0 tclass=dir
/disk2
?