I have a seedbox-account which I use for torrenting. I have set up a cron job that uses rsync to download all files from the seedbox to my 14.04.1 ubuntu server. The download folder is a samba share, as I have previously used windows to organize the content into folders before moving it to a more permanent place on my server. Before upgrading to 14.04, I used 12.04 and everything worked OK. The problem is that the files I get from the seedbox is owned by a user called 544 (this is the username generated by the seedbox, not some octal thing) and can not be deleted by my user on my server. After changing permissions on the download folder, I can delete them. Also, I have given all users permissions to read/write in the samba folder upon sharing it.So my question is this: Is it possible through some elegant command executed to make rsync change user/permissions on the files when downloading it? Or is it possible to make the folder function in a way that all new files will automatically change user when copied/moved to it? I guess I could put the chmod command in sudo cron to run every once in a while to change the owner of the files, but since sometimes the amount of data to be downloaded can be rather large, it is difficult to know when to trigger it in relation to the rsync-job to make sure all files are downloaded.
Force new permissions on files after rsync from seedbox
permissions;rsync;samba