ioos / ioosngdac

IOOS National Glider Data Assembly Center (V2)
https://ioos.github.io/ioosngdac/
8 stars 18 forks source link

Preventing users from transferring files to user home directory? #198

Closed kerfoot closed 1 year ago

kerfoot commented 1 year ago

The gcoos_dmac user has mistakenly uploaded profile NetCDF files to:

/data/data/priv_erddap/gcoos_dmac

instead of the corresponding data set location. For example, there are NetCDF files in:

/data/data/priv_erddap/gcoos_dmac

from sg624-20230711.nc to sg624-20230717.nc

that should be in:

/data/data/priv_erddap/gcoos_dmac/sg624-20230712T1200

Is it possible to restrict file uploads only to a data set directory and not to the user's home directory?

Looks like this user has done this for many data sets.

kerfoot commented 1 year ago

I removed 2202 NetCDF files from /data/submission/gcoos_dmac.

benjwadams commented 1 year ago

I don't know of a way to do this -- glider user needs to be able to create directories in the "virtual home" directory FTP uses. vsftpd also runs as this same user.

benjwadams commented 1 year ago

Directories are also considered files in Linux, so unless you changed the UID/GID the providers app was running in to allow writes to the directory and required users to only create deployments via the providers app, I don't think this will be possible.

kerfoot commented 1 year ago

closed as impossible.