LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2014, 03:25 PM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
Question transmission-daemon UID and permissions


Hi all,

I built a simple home server/WAP/ADSL gateway on a FreeBSD box and I've been running the transmission daemon to handle Bittorrent downloads. I access the downloaded files from a couple of desktop machines via NFS shares.

I took me awhile to figure out why the downloaded files were read-only on these NFS disks -- they are owned by UID 921, transmission-daemon. This makes managing downloaded files via Nautilus on the desktop boxes a bit cumbersome.

I'm wondering how others arrange this. Manually chown stuff? Or this there a smarter approach? I could run transmission-daemon with my own UID, but there are probably very good reasons why this is not a good idea
 
Old 06-12-2014, 02:37 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Use setfacl on the containing directory, you have to unset/reset the umask
Quote:
#setfacl -R --mask g:users:rw,d:g:users:rw directory_name/
 
Old 06-13-2014, 03:41 PM   #3
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Ladies and Gentlemen, for the win:

Drum roll ...... ta da dish !

Run it as you
with sudo !

Code:
sudo -u user transmission-daemon
EDIT: Put the following in /etc/rc.local or similar.
 
Old 06-14-2014, 04:25 AM   #4
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
OK, that is a good idea.

There alread is a start-up script in /usr/local/etc/rc.d/ which includes the following lines:
Code:
: ${transmission_enable:=NO}
: ${transmission_conf_dir=/usr/local/etc/transmission/home}
: ${transmission_download_dir=/usr/local/etc/transmission/home/Downloads}
: ${transmission_user:=transmission}
transmission_group=${transmission_group:-$transmission_user}
: ${transmission_chown:=yes}
I wonder how best to override the default setting. I'd rather not edit the file but set it in rc.conf.

But at this point, I have to ask: why use sudo? Why not run it simply under my UID, 1000?

Thanks
 
Old 06-14-2014, 05:12 PM   #5
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by Kropotkin View Post
OK, that is a good idea.

There alread is a start-up script in /usr/local/etc/rc.d/ which includes the following lines:
Code:
: ${transmission_enable:=NO}
: ${transmission_conf_dir=/usr/local/etc/transmission/home}
: ${transmission_download_dir=/usr/local/etc/transmission/home/Downloads}
: ${transmission_user:=transmission}
transmission_group=${transmission_group:-$transmission_user}
: ${transmission_chown:=yes}
I wonder how best to override the default setting. I'd rather not edit the file but set it in rc.conf.
I run mine on Linux so I don't know about rc.conf, but looking above it seems that just changing the user and group might get the job done too.

Quote:
But at this point, I have to ask: why use sudo? Why not run it simply under my UID, 1000?

Thanks
I run mine manually through rc.local, and without sudo it will run as root. sudo makes it run under my normal user account which is uid 1000 too.
 
Old 06-14-2014, 07:29 PM   #6
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
sudo -u user transmission-daemon
You're standard user account is a passwordless member of sudoers?
That's a bad idea.
Putting that information in a script?
Worse idea..."fire you on the spot" kind of bad idea, actually.
If you're just messing around, it's fine. If you're trying to learn a skill... read up on setfacl.
 
Old 06-15-2014, 02:45 PM   #7
DJ Shaji
Member
 
Registered: Dec 2004
Location: Yo Momma's house
Distribution: Fedora Rawhide, ArchLinux
Posts: 518
Blog Entries: 15

Rep: Reputation: 106Reputation: 106
Quote:
Originally Posted by dijetlo View Post
Your standard user account is a passwordless member of sudoers?
Nope. As mentioned above the /etc/rc.local runs sudo, and because it's root no passwords are asked for. No other user can sudo on this system (even though there's just the one).

Quote:
That's a bad idea.
Yep.

Quote:
Putting that information in a script?
Worse idea..."fire you on the spot" kind of bad idea, actually.
If you're just messing around, it's fine. If you're trying to learn a skill... read up on setfacl.
It's my home server and it's fully locked down
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transmission Remote GUI daemon reboot required SamSlam023 Linux - Newbie 1 12-09-2013 05:42 PM
[SOLVED] xbmcbuntu & transmission-daemon jlivin25 Linux - Newbie 5 04-26-2012 01:00 PM
Transmission daemon permissions problem. SUID related??? cbass Linux - Software 2 10-19-2011 03:03 PM
transmission-daemon doesn't download zoran119 Slackware 1 10-19-2011 02:15 PM
[SOLVED] Shorewall rejecting allowed traffic for transmission-daemon RyanRahl Linux - Security 7 05-23-2011 02:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration