Ubuntu users and security

Ask for help and report issues with the GTK+ version of Transmission
Post Reply
AtariBaby
Posts: 37
Joined: Sun Feb 21, 2010 8:01 am

Ubuntu users and security

Post by AtariBaby »

This guide urges the user to install Transmission as its own user rather than the Ubuntu account username. Is this important, or not really? I didn't do it but I will if it's advised.

Code: Select all

It is recommended that Transmission runs under it’s own username for security reasons. This creates a few issues with file and folder access by Transmission as well as your account (let us assume it is user). You will have to create a new set of folders for Transmission to read/write/execute (example: transmission folder containing these subfolders: completed, incomplete, and torrents). The account user also needs full control over these folders and their contents. I recommend reading this post to familiarize yourself with safely changing user groups and permissions.
First, cd to the desired folder and create a folder for Transmission to use:
cd /home/user/Downloads
mkdir transmission
cd transmission
mkdir completed incomplete torrents
Then, add the username user to the group debian-transmission:
sudo usermod -a -G debian-transmission user
This will add debian-transmission as a secondary group to the account user, resulting in access to both Transmission and user. Then, change the ownership of the Transmission download folders to the group debian-transmission:
sudo chgrp -R debian-transmission /home/user/Downloads/transmission
Next, change the permissions for the transmission download folders to allow read, write, and execute for Transmission and user:
sudo chmod -R 775 /home/user/Downloads/transmission
This gives the group debian-transmission, of which both Transmission and user are members of, full access while others get only read and execute permissions. If you want to further restrict access for others you could use 774 (read only) or 770 (no access).

Finally, as described later, you will also have to set the umask parameter in Transmission’s settings file to “2″ (default is 18) for the account user to have full access to files/folders created by Transmission.
---
Then create a transmission settings directory in your home folder (example: /home/user/.config/transmission-daemon), copy settings.json into it, and change its permissions to make it accessible to transmission-daemon:
mkdir /home/user/.config/transmission-daemon
sudo cp -a /etc/transmission-daemon/settings.json transmission-daemon/
sudo chgrp -R debian-transmission /home/user/.config/transmission-daemon
sudo chmod -R 770 /home/user/.config/transmission-daemon
Then, remove /etc/transmission-daemon/settings.json, create a symbolic link in the /etc/transmission-daemon folder, and edit it permissions to make it accessible to Transmission and the user account:
cd /etc/transmission-daemon
sudo rm settings.json 
sudo ln -s /home/user/.config/transmission-daemon/settings.json settings.json
sudo chgrp -R debian-transmission /etc/transmission-daemon/settings.json
sudo chmod -R 770 /etc/transmission-daemon/settings.json
AtariBaby
Posts: 37
Joined: Sun Feb 21, 2010 8:01 am

Re: Ubuntu users and security

Post by AtariBaby »

helloooooo
AtariBaby
Posts: 37
Joined: Sun Feb 21, 2010 8:01 am

Re: Ubuntu users and security

Post by AtariBaby »

Oh I took the high road, but in case you are concerned your condescending responses to my requests for help were lost on me, they weren't. I'll be very reluctant to ask for help in grasping this stuff next time.
Post Reply