Transmission on ntfs partition the proper way

I am trying to find out a way for using transmission-daemon on ntfs partition.
At the moment I have solved it by using fstab in the following way:

UUID=… /mnt/… ntfs rw,nosuid,nodev,relatime,uid=1000,gid=116,permissions,umask=007,nofail 0 0

(116 is group_id of debian-transmission)

but I am not satisfied with this solution.

Is there a better way?

NTFS is a windows fs system, so in my experience there is no right or good way to do that… you should use a native fs for linux like ext3/4 or even use exfat would be better… userspace drivers (fuse + ntfs-3g) is more CPU hungry and IO hungry.

i just don’t think torrent download and NTFS on linux is a good match.

Is there a reason you what to use NTFS to write to on linux?


i know exfat is not native, but it’s simpler than NTFS.

The reason why I am using ntfs is - portability.
I need an option to take usb drive to let’s say vacations, or to transfer huge files from windows computer to RPI2 and vice versa.

As RPI2 is strong enough, there are no performance problems.
What is bothering me is that transmission is open to internet and if someone manages to brake in, by being transmission-daemon user, he will have access to all files on my ntfs hard drive.

Maybe to set an umask in a way to allow for group only write access?

i would use exfat, NTFS driver in linux is reverse engineered… aka made of guess work i would not trust it… read is fine but writing a lot like torrent would do is not recommended at least not by me!.. but hey your choice ;-).

You should not need to do anything! Simply connect your external harddrive and you are good to go.
I have a RPi2 setup for parents, NTFS hdd connected. Transmission downloads to the harddrive. I did not need to do anything. Why are you messing with fstab? OSMC will mount the drive automatically, correctly with optimal settings.

There is no need to switch to exFAT (I believe it is not recommended, definitely not for harddrives, NTFS is better because it is journaled, better data restoring capabilities in case something goes wrong). ExFat is fine for usb sticks and SD cards.

I use NTFS also with a Cubox and with an RPi1. I also want to be able to hotplug/disconnect the drive and take with me on short trips or simply to copy my pictures/videos when I get home after an event or holiday. I never had issues, no speed issues, no mount issues!
Stick with NTFS, but explain why you believe you need to mess around with fstab?

Well, I want all my drives to be mounted under /mnt directory.
The second, I am worried about security.
If someone finds a hole in transmission, they can break in and become transmission user. If that ever happen, they will have an access to the whole disk because your or my setup will give to intruder (transmission user) rwx access.

In order to avoid it, I could give to transmission group only write access. In that case intruder will not be able to browse the disc, but he will be able to delete it completely, which is slightly better.

At the moment the only option I can see is to add usb drive of 32GB or more, that I should format with ext4, and than using it for transmission.
It is the most secure way.

Where is the documentation that bit-torrent protocol has be used to exploit a host system in the manner that you are afraid of? Millions of people use bit torrent daily. Guess what? If it were able to be exploited in the manner you describe, NONE of those millions would be using it. And even if there were some exploit in the protocol, it wouldn’t matter if your drives were formatted in NTFS, EXT4, or any other file system you could use.

Why ?

I don’t think you understand how the file system permissions work on non-unix file systems such as FAT32 and NTFS when mounted on Linux - you cannot use chown and chmod on files or directories on FAT32 or NTFS partitions, the “permissions” of every file and directory on the drive are set at mount type using mount options, in our case we specify (in udisks-glue.conf) ‘fmask=0111’,‘dmask=0000’,‘uid=1000’,‘gid=1000’ this makes it appear that all files are owned by the osmc user and group, and the fmask and dmask give you the file permissions.

You cannot set the permissions on different files or directories independently - they are always the same - if you have access to one part of the drive you have access to all parts of the drive. There is no way around that as long as you use NTFS. You would have to use ext4 to have individual per file ownership and access rights.

I doubt that you have actually tried this before, because it will not work. A torrent program cannot work by having write only access to the files it is downloading, it must be able to read them as well so that it can seed to other users, not to mention to read the file blocks to perform checksumming and so on.

So your “slightly better” security will not really make it any more secure and will actually prevent things working at all.

How is it more secure ? What else do you have on the drive other than video / media files ?

As I point out above out transmission needs to be able to read the files that it writes to work properly, and the osmc user needs to be able to read the files for Kodi to read and play them. (And also needs to write to the directories to do things like downloading subtitles etc)

1 Like

Haha ok. So just to confirm: Transmission works fine after installing it via Kodi>MyOSMC, you can edit the config file and set the download and incomplete folder (on your NTFS) hard drive. Correct?

Your worries about security and idea how to make it secure are incorrect. But if you want to protect yourself from the ignorent movie industry (perhaps that is what you mean?), you can install OpenVPN and configure it in such a way, VPN will only be used by Transmission. Other applications (Kodi, apt-get) will not use VPN (saves band with and is faster). I dont know how to do this but there are guides if you Google it.

That was just a (bed) theory. Thanks for clarification.