NICMx / FORT-validator

RPKI cache validator
MIT License
47 stars 22 forks source link

Permission Error #140

Closed agharehchamani closed 2 weeks ago

agharehchamani commented 3 weeks ago

I am getting this error while running the service : Could not open file '/etc/fort/roas.csv': Permission denied I tried to change the directory to the home directory but again getting the same error Here is the output : sudo service fort status ● fort.service - FORT RPKI validator Loaded: loaded (/lib/systemd/system/fort.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2024-06-18 14:00:36 PDT; 20min ago Docs: man:fort(8) https://nicmx.github.io/FORT-validator/ Main PID: 858 (fort) Tasks: 22 (limit: 9387) Memory: 755.9M CPU: 10min 15.277s CGroup: /system.slice/fort.service └─858 /usr/bin/fort --configuration-file /etc/fort/config.json

Jun 18 14:19:52 ERR [Validation]: rsync://rpki.co/repo/Riffi/0/CB2B40C722F645663A261D605D1C78BD1B720065.mft: File 'rsync://rpki.co/repo/Riffi/0/AS216412.asa' listed at manifest doesn't exist. Jun 18 14:21:12 ERR [Validation]: Could not open file '/etc/fort/roas.csv': Permission denied Jun 18 14:21:12 ERR [Validation]: Could not open file '/etc/fort/bgpsec.csv': Permission denied Jun 18 14:21:12 INF: Validation finished: Jun 18 14:21:12 INF: - Valid ROAs: 554058 Jun 18 14:21:12 INF: - Valid Router Keys: 0 Jun 18 14:21:12 INF: - Serial: 1 Jun 18 14:21:12 INF: - Real execution time: 1236s Jun 18 14:21:12 WRN: First validation cycle successfully ended, now you can connect your router(s) Jun 18 14:21:12 INF: Main loop: Sleeping.

Config.JSON :

{ "tal": "/etc/fort/tal", "local-repository": "/var/lib/fort", "server": { "address": ["X.Y.Z.Z"], "port": "8323", "internal": { "validation": 900, "refresh": 900, "retry": 600, "expire": 7200 } }, "log": { "enabled": true, "level": "info" }, "validation-log": { "enabled": true, "level": "info" }, "output": { "roa": "/etc/fort/roas.csv", "bgpsec": "/etc/fort/bgpsec.csv", "format": "csv" } }

ydahhrk commented 2 weeks ago

It seems to have installed incorrectly. Please answer all four questions, even if the chown solves the problem.

  1. What is your operating system, distribution and version?
  2. Which version of Fort are you running? (fort -V)
  3. Which set of steps did you follow to install Fort?~
  4. ~Does /etc/fort exist? If not, sudo mkdir -p /etc/fort.~ Never mind; it does exist.
sudo chown -R fort:fort /etc/fort
agharehchamani commented 2 weeks ago

Hi, thanks for getting back

1- Distributor ID: Ubuntu Description: Ubuntu 22.04.4 LTS Release: 22.04 Codename: jammy 2-fort 1.6.2 3- These are the commands : sudo apt install autoconf automake build-essential libjansson-dev libssl-dev pkg-config rsync libcurl4-openssl-dev libxml2-dev pwd mkdir fort cd fort/ wget https://github.com/NICMx/FORT-validator/releases/download/1.6.2/fort_1.6.2-1_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb sudo apt install ./fort_1.6.2-1_amd64.deb ls /etc/fort sudo cp -p /etc/fort/config.json /etc/fort/config.json.backup sudo nano /etc/fort/config.json ls /etc/fort/tal/ cd /etc/fort/tal/ sudo wget https://www.arin.net/resources/manage/rpki/arin.tal sudo service fort start sudo service fort status

and the json file has been shown above

ydahhrk commented 2 weeks ago

Ok, thank you.

Did the chown fix the issue?

agharehchamani commented 2 weeks ago

Ok, thank you.

Did the chown fix the issue?

Yes, it did. Thank you