Bug 42873

Summary: file из-под root не может открыть файл на чтение
Product: Sisyphus Reporter: Andrew Vasilyev <andy>
Component: fileAssignee: placeholder <placeholder>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: glebfm, ldv, placeholder, vt
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Andrew Vasilyev 2022-05-27 12:53:51 MSK
Если файл принадлежит не-root и доступен на чтение только для 
  владельца, то команда file не может его открыть:

-rw------- 1 _libvirt vmusers 21478375424 мая 23 14:43 test.qcow2
# file test.qcow2
test.qcow2: regular file, no read permission

-rw------- 1 root vmusers 21478375424 мая 23 14:43 test.qcow2
# file -L test.qcow2
test.qcow2: QEMU QCOW2 Image (v3), 21474836480 bytes
Comment 1 Vitaly Chikunov 2022-05-27 13:46:30 MSK
Есть опция -S, но она не влияет на сброс root capabilities. Можно сделать, чтоб влияла.
Comment 2 Repository Robot 2022-05-27 14:36:47 MSK
file-5.41-alt4 -> sisyphus:

 Fri May 27 2022 Vitaly Chikunov <vt@altlinux> 5.41-alt4
 - sandbox: Allow CAP_DAC_READ_SEARCH when sandboxing is disabled (ALT#42873).
Comment 3 Vitaly Chikunov 2022-05-27 14:40:17 MSK
В новой версии

    # file xenomai-3.1-alt2.x86_64.rpm
    xenomai-3.1-alt2.x86_64.rpm: regular file, no read permission
    # file -S xenomai-3.1-alt2.x86_64.rpm
    xenomai-3.1-alt2.x86_64.rpm: RPM v3.0 bin i386/x86_64 xenomai-3.1-alt2