Skip to content

Conversation

EpicPlayerA10
Copy link
Contributor

@EpicPlayerA10 EpicPlayerA10 commented Jul 1, 2024

Adds sftp.read to activity log when file is read in SFTP.

Resolves pterodactyl/panel#5136

Linked with PR pterodactyl/panel#5148

@danny6167
Copy link
Member

Thank you for your submission.

I've looked into this, and it appears there used to be logging for SFTP read events. It was dropped during the migration to sqlite based event buffer. If memory serves, I believe it was deliberately removed due to performance concerns.

I personally do like the idea of this being available. Access though the panel is logged so makes sense to be consistent, even if it has to be gated behind a config flag. So I'll see what @matthewpi want's to do about this.

@EpicPlayerA10
Copy link
Contributor Author

I don't think so that it would hit performance so much. I mean that sftp.read is very similar to sftp.write, except instead of trigerring on write, it triggers on read. sftp.write is already triggered very frequently without any performance issues, so all the more there will be no problems with sftp.read.

@matthewpi
Copy link
Member

This must be gated behind a config option before I'd consider merging it. While someone could argue writing files produces a lot of logs as it stands, writing files is definitely something we want to know about while reads are less important. Especially over a protocol like SFTP where automated tooling may be used to sync files.

@EpicPlayerA10
Copy link
Contributor Author

Should the option be enabled or disabled by default?

@matthewpi
Copy link
Member

Should the option be enabled or disabled by default?

The option should be named enable and set to false by default

@EpicPlayerA10
Copy link
Contributor Author

The option should be named enable and set to false by default

Done

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.

Add sftp.read to activity log when someone opens a file via SFTP
3 participants