Bug 42873 - file из-под root не может открыть файл на чтение
Summary: file из-под root не может открыть файл на чтение
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: file (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: placeholder@altlinux.org
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-05-27 12:53 MSK by Andrew Vasilyev
Modified: 2022-05-27 14:40 MSK (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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