xombiemp / ultimate-torrent-setup

All the files needed for the Ultimate Torrent Setup, featuring Ubuntu, rtorrent, ruTorrent, Sonarr, Radarr.
232 stars 44 forks source link

Add default permissions to watch folders #50

Closed bengadbois closed 7 years ago

bengadbois commented 7 years ago

.torrent files copied to /data/torrent/watch/* may not have the right permissions (e.g. common 755 owned by random user). It gets stuck here and ends up with a *.torrent.fail.

xombiemp commented 7 years ago

How are the torrents getting to the watch folder? What is sending it there?

bengadbois commented 7 years ago

If you choose to not use Reslio Sync and scp/rsync one-off torrent files. This is for manually adding torrents here and there (things outside of the Sonarr/CP flow).

xombiemp commented 7 years ago

I added a couple commands to the wiki that sets the group ID and the default group ACLs for the data folders. That way new files will have the group of the parent folder and the group will have read+write access. Here are the changes to the wiki: https://github.com/xombiemp/ultimate-torrent-setup/wiki/Home/_compare/74d7a3292b1b8ea6b893ebbf88d50ad1359aefdb...ae31350fe717b4f4d7a6c59d923b695022765bb8

After those commands are run I tested using rsync and this gave it the correct group and group permissions: rsync --chmod=ugo=rwX source destination

I also tested uploading files with Cyberduck and Filezilla and the group and permissions were correct for files transferred using those. I don't think there is a way to do it with scp other than running a chmod on the file after the scp transfer, which you should be able to do remotely.

scp /path/to/file server:/server/path/to/file

ssh server chmod 664 /server/path/to/file
bengadbois commented 7 years ago

setfacl isn't installed by default on 16.04 there should be an apt install acl somewhere above that, maybe in the sudo apt install -y git subversion ... list here

xombiemp commented 7 years ago

It seems to be installed by default for me in my tests. Also this manifest file suggests it is installed by default in the desktop build http://releases.ubuntu.com/xenial/ubuntu-16.04.2-desktop-amd64.manifest I can't find a manifest file for the server build, but it seems that acl is installed by default in it too.

What makes you say it's not?

bengadbois commented 7 years ago

Hm you're right. I guess the image I get from my host is modified and acl is removed. I tried another and it had it.