Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create LB/FW/IP temporary files under /tmp directory #27

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

vincentmli
Copy link
Contributor

@vincentmli vincentmli commented Aug 26, 2024

When run loxicmd save -c "dir" with --ip or --firewall or --lb from BPFire web interface with user "nobody" when "dir" is owned by user "nobody", web inrerface got error "Can't create dump file".

The issue is reported in vincentmli/BPFire#30 with the help of libbpf-tools opensnoop, the permission error shows below:

PID COMM FD ERR PATH

23194 loxicmd -1 13 lbconfig_2024-08-23_19:00:35.txt

ERR 13 is EACCESS, and the PATH is lbconfig_2024-08-23_19:00:35.txt

"lbconfig_2024-08-23_19:00:35.txt" is neither under "dir" nor "/tmp" which web user "nobody" has permission to create file in.

since "lbconfig_2024-08-23_19:00:35.txt" is temporary file, we can create the temporary file under /tmp directory and automatically get removed after loxicmd exit.

fix: #26

When run loxicmd save -c <dir> with --ip or --firewall or --lb
from BPFire web interface with user "nobody" when <dir> is
owned by user "nobody", web inrerface got error "Can't create dump file".

The issue is reported in vincentmli/BPFire#30
with the help of libbpf-tools opensnoop, the permission error shows
below:

PID    COMM              FD ERR PATH

23194  loxicmd           -1  13 lbconfig_2024-08-23_19:00:35.txt

ERR 13 is EACCESS, and the PATH is lbconfig_2024-08-23_19:00:35.txt

"lbconfig_2024-08-23_19:00:35.txt" is neither under <dir> nor /tmp
which web user "nobody" has permission to create file in.

since "lbconfig_2024-08-23_19:00:35.txt" is temporary file, we can
create the temporary file under /tmp directory and automatically get
removed after loxicmd exit.

fix: loxilb-io#26

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
@TrekkieCoder TrekkieCoder requested a review from inhogog2 August 26, 2024 17:32
@inhogog2 inhogog2 merged commit aa3d917 into loxilb-io:main Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

loxicmd save -l -c /var/ipfire/loxilb/ result in "Can't create dump file"
2 participants