Can I change user group during upload to server

45 Views Asked by At

I need solution for something like this:

I am uploading file on server with a line:

ftp.storbinary(f'STOR a.json', file)

I have server vsftpd.

I need to change group during upload. I found something similar:

Change permissions via ftp in python

Author used line:

ftp.sendcmd('SITE CHMOD 644 ' + filename)

I need something like that:

 ftp.sendcmd('SITE CHOWN test_user:test_group' + filename)

How can i fix this?

Thanks for help.

0

There are 0 best solutions below