Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Users can ftp files to their home directory #154

Closed
kerfoot opened this issue Oct 21, 2020 · 6 comments
Closed

Users can ftp files to their home directory #154

kerfoot opened this issue Oct 21, 2020 · 6 comments
Labels

Comments

@kerfoot
Copy link
Contributor

kerfoot commented Oct 21, 2020

Just found this out the hard way, but I was able to upload .nc files from a dataset to my data provider home directory. I'm writing a python ftp script to push files and forgot to add the dataset folder name to the upload path. But the files were transferred nonetheless. Probably should not allow this.

@kerfoot kerfoot added the bug label Oct 21, 2020
@benjwadams
Copy link
Contributor

I'm not entirely clear on the issue here, but I don't see any files uploaded to /home subdirectories, and users are chrooted in the current FTP setup. I will need more clarification on what occurred here.

@kerfoot
Copy link
Contributor Author

kerfoot commented Oct 21, 2020 via email

@benjwadams
Copy link
Contributor

So the directory should be set to /data/submission/$username. We can disable write bit on that particular directory, only relying on the providers application to create the subdirectories. We'd likely have to have the application running as another user with write permissions so it can create the subdirectories.

@kerfoot kerfoot closed this as completed Sep 8, 2022
@kerfoot
Copy link
Contributor Author

kerfoot commented Oct 25, 2022

Reopening this as a user ftp'd files to their user directory and not the deployment directory. The files were ftp'd to:

/data/data/priv_erddap/USERNAME

and not:

/data/data/priv_erddap/USERNAME/DEPLOYMENT

We need to address this

@kerfoot kerfoot reopened this Oct 25, 2022
@benjwadams
Copy link
Contributor

As far as I know, this isn't easily addressable with Linux FACLs without also disabling write permissions in the "base" FTP virtual directory. It's possible to disable write to the base directory, but then users will have to create a deployment only through the providers application.

@kerfoot
Copy link
Contributor Author

kerfoot commented Nov 22, 2022

Understood. I'll close this for now and we'll likely have to deal with the situation, when it comes up, by hand.

@kerfoot kerfoot closed this as completed Nov 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants