steven5 Posted February 2, 2022 Share Posted February 2, 2022 Problem: After changing the logging location for PineAP to /usb/logs/ and restarting the Wifi Pineapple (Mark 7), the activity logs are not displayed in the Logging->PineAP Activity section. My analysis: When checking the log location, the size date modified does change, so it seems like writing to the new log location is working. root@mk7:/pineapple# ls -l /usb/logs/ -rwxrwxrwx 1 root root 1273856 Feb 2 12:28 log.db root@mk7:/pineapple# ls -l /usb/logs/ -rwxrwxrwx 1 root root 1277952 Feb 2 12:32 log.db Any ideas? Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 2, 2022 Share Posted February 2, 2022 It seems as if the location of the log (as you correctly have observed) actually moves to the new location, but the web UI doesn't read from that file. It's pretty obvious when testing different log options. When set to /tmp (the default), the page showing logs updates as it should. If moving the location to some alternative place, then the old log entries keeps on showing (those in /tmp), nothing from the new location. If the log file in /tmp is removed, the web UI gets empty again even though /tmp should be "out of scope". So, the web UI is obviously not fetching any log entries from the alternative location, but expects it to always be placed in /tmp. The file /tmp/pineap.conf changes and reflects the changes being made to the log location, but, as said, it's not used as it seems (also stored in the /etc/config/pineap file). When moving the log.db file from the alternative location to /tmp, the log entries that was saved to the alternative location is being shown in the logging tab of the web UI, so logging is truly being done to the alternative location. Always stopping Pineap in the web UI before setting the new log location and then restarting it, and since the pineap process is started with the pineap.conf file, it should read the new location. A workaround can be to create a symlink in /tmp to the alternative location where the log file actually is. For example cd /tmp rm log.db (or rename it if you want to keep it for some reason) ln -s /usb/logs/log.db log.db Be sure to be quick since the log.db file in /tmp is recreated if deleted (most likely not if PineAP is disabled when doing this). Now the web UI should update from the alternative location. Not the correct way to do it, but it works. The symlink won't be persistent over reboots though since it's in /tmp. Link to comment Share on other sites More sharing options...
steven5 Posted February 4, 2022 Author Share Posted February 4, 2022 Thanks for the quick response dark_pyrro! The workaround does not seem to work for me. My steps: Stop PineAP Change logging location to /usb/logs/ Remove /tmp/log.db Create symlink as you described (ln -s /usb/logs/log.db log.db) Start PineAP The logging section is still not showing logs Is there a way for me to file a bug report so maybe in a future release this could be fixed? Link to comment Share on other sites More sharing options...
dark_pyrro Posted February 4, 2022 Share Posted February 4, 2022 Where in the file system are you positioned in step 4? You need to be in /tmp Regarding bug reports, you can probably start here, in "Product Support" https://hak5.customerdesk.io/ Link to comment Share on other sites More sharing options...
steven5 Posted February 4, 2022 Author Share Posted February 4, 2022 I got the symlink working now, had to remove the log.db file in /usb/logs/, after restarting PineAP the logs show up. Thanks again! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.