I'm using python with ftplib
to upload images to a folder on my raspberryPi located in /var/www.
Everything is working fine except that uploaded files have 600
permissions and I need 644
for them.
Which is the best way to do this? I'm searching for something like:
def ftp_store_avatar(name, image):ftp = ftp_connect()ftp.cwd("/img")file = open(image, 'rb')ftp.storbinary('STOR ' + name + ".jpg", file) # send the file[command to set permissions to file]file.close()ftp.close()