D
D
dexforint2018-07-19 16:09:25
linux
dexforint, 2018-07-19 16:09:25

Uploading files by a linux user to a specific folder?

I'm building an application that allows users to upload files to my server using the sftp protocol. To do this, you need to create a user on the server with certain rights. The rights are as follows:
the user can only upload files to a specific folder;
the size of the files in the folder must be less than 100 mb;
The user cannot do anything other than upload files (even delete their uploaded files).
How can I implement this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry, 2018-07-19
@Tabletko

correct permissions, correct umask, quotas and home directory

S
Saboteur, 2018-07-19
@saboteur_kiev

Why can't you make this restriction in your application?
Read help on sftp server, for example vsftp can do quota and lock users in their home directory.

T
ThunderCat, 2018-07-19
@ThunderCat

emnip the file size in the folder is not regulated in any way by means of OS / fs, only the limit on the total volume. Perhaps sftp servers can do something similar, even most likely it is, all your Wishlist can be steered through the sftp server config. Google suggests that the sftp client will also have the ability to connect ssh, since in fact it all happens over ssh. So the rights to only write can be put on the folder through the wasps.
about limits:
https://serverfault.com/questions/522997/set-max-u...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question