Bug 53442 - Создаёт папки и файлы с некорректным владельцем (и падает)
Summary: Создаёт папки и файлы с некорректным владельцем (и падает)
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: tcpflow (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Afanasov Dmitry
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-13 17:09 MSK by Artem Varaksa
Modified: 2025-03-13 17:09 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Artem Varaksa 2025-03-13 17:09:04 MSK
Шаги
====

1. # apt-get install -y tcpflow
2. # control tcpflow public
3. $ tcpflow -Iao flow

Фактический результат
=====================

Пример для обычного пользователя test.

$ tcpflow -Iao flow
> reportfilename: flow/report.xml
> terminate called after throwing an instance of 'std::invalid_argument*'
> Аварийный останов

$ ll flow
> итого 12
> -rw-r--r--  1 root test 2302 мар 13 16:35 report.xml
> drwxr-xr-x  2 root test 4096 мар 13 16:35 ./
> drwx------ 10 test test 4096 мар 13 16:35 ../

Чтобы исправить ситуацию, требуется:

# chown -R test: /home/test/flow

После этого команда `$ tcpflow -Iao flow` работает.
Команда так же работает, если изначально (до 3 шага) создать папку с помощью `$ mkdir flow` с корректными владельцами.

Однако, создаваемые файлы всё равно оказываются с владельцем root:test, что, думаю, само по себе некорректно:

$ ll flow
> итого 52
> -rw-r--r--  1 test test  3837 мар 13 16:55 report.xml
> -rw-r--r--  1 root test 12773 мар 13 16:55 report.pdf
> drwxr-xr-x  2 test test  4096 мар 13 16:55 ./
> -rw-r--r--  1 root test    60 мар 13 16:55 ip1.00022-ip2.45576
> -rw-r--r--  1 root test    23 мар 13 16:55 ip1.00022-ip2.45576.findx
> -rw-r--r--  1 root test     6 мар 13 16:55 ip2.45576-ip1.00022
> -rw-r--r--  1 root test   110 мар 13 16:55 ip2.45576-ip1.00022.findx
> drwx-----x 10 test test 12288 мар 13 16:54 ../

Ожидаемый результат
===================

Отсутствие падения.
Создание всех файлов и папок с корректным владельцем (в данном случае test:test).

Воспроизводимость
=================

Воспроизводится на виртуальных машинах:

[sisyphus] ALT Server 11.0 beta20250213 x86_64
tcpflow-1.6.1-alt2.x86_64

[p10] ALT Server 10.4 x86_64
tcpflow-1.5.0-alt1.x86_64