sftp icon indicating copy to clipboard operation
sftp copied to clipboard

change permission for multiple users in docker-compose.yml ?

Open shredman01 opened this issue 2 years ago • 1 comments

Hi,

a very nice container, logging in with own ssh keys is workingh well but how can I share a local directory as a upload directory for a atmoz/sftp user. When I set is as follows, this user "test" is able to upload files.

user dependend dirs

    - ./data/upload:/home/test/upload
ports:
    - "2222:22"
command: test::1000

When I set another users ulpoad path, sftp for example, this user is not able to upload files in due to permission problems. no write permission.

user dependend dirs

    - ./data/upload:/home/test/upload
    - ./data/upload:/home/sftp/upload
ports:
    - "2222:22"
command: test::1000
command: sftp::65534  <---- ?

My question, is it possible to use the command option multiple times in docker-compose.yml. I think it's not possible because I get an error message from docker-compose.

Thank you in advance

Regards, Frank

shredman01 avatar Jul 26 '22 11:07 shredman01

Here is the correct syntax:

    ports:
      - "2222:22"
    command:
      - user1:pass1:33:33
      - user2:pass2:33:33
      - user3:pass3:33:33

premax avatar May 03 '23 10:05 premax