1

I've tried creating a separate user account for rtorrent and sickbeard (a torrent downloader) so everything isn't running as root but I've bitten off more than I can chew.

I've chmodded 2770 (setgid, user+group ALL) and am sure 'sickbeard' is in the 'users' group, as is rtorrent. Sickbeard is still complaining that it can't write. I've even tried 'su sickbeard', navigated to the directory, and touching to create a file and it works perfectly. I am sure sickbeard is running as the user sickbeard, I've checked in htop.

Here is some output that might be of use:

      sickbeard@parsnip:/media/store1/torrents$ groups
      sickbeard users

      rtorrent@parsnip:/media/store1/torrents$ groups
      rtorrent users

      root@parsnip:/media/store1/torrents# ls -lha
      total 268K
      drwxrws---  7 rtorrent users 4.0K Mar 27 16:46 .
      drwxrws--- 11 root     users 4.0K Mar 27 17:03 ..
      drwxrws---  4 rtorrent users 4.0K Mar 27 16:26 complete
      drwxrws---  4 rtorrent users 4.0K Mar 27 16:46 download
      drwxrws---  2 rtorrent users 244K Mar 27 16:42 session
      drwxrws---  2 rtorrent users 4.0K Mar 27 13:56 uploads
      drwxrws---  4 rtorrent users 4.0K Mar 27 16:25 watch

      rtorrent@parsnip:/media/store1/torrents/watch/tv$ ls -lha
      total 12K
      drwxrws--- 3 rtorrent users 4.0K Mar 27 16:25 .
      drwxrws--- 4 rtorrent users 4.0K Mar 27 16:25 ..
      drwxrws--- 2 rtorrent users 4.0K Mar 27 17:09 sickbeard

Hopefully a unix pro can point out where I'm going wrong.

EDIT: There is definitely something strange going on. The conflicting info below has me puzzled - I haven't changed a thing since the above.

      parsnip@parsnip:~$ sudo grep -e '^users:' /etc/gshadow
      users:*::xbmc,sickbeard,rtorrent,parsnip,root
      parsnip@parsnip:~$ sudo grep -e '^users:' /etc/group
      users:x:100:xbmc,sickbeard,rtorrent,parsnip,root
      parsnip@parsnip:~$ groups
      parsnip adm cdrom sudo dip plugdev lpadmin sambashare
      parsnip@parsnip:~$ cd /media/store1/torrents/complete/tv/sickbeard
      -bash: cd: /media/store1/torrents/complete/tv/sickbeard: Permission denied
      parsnip@parsnip:~$ su sickbeard
      sickbeard@parsnip:/home/parsnip$ groups
      sickbeard users
      sickbeard@parsnip:/home/parsnip$ cd /media/store1/torrents/complete/tv/sickbeard
      sickbeard@parsnip:/media/store1/torrents/complete/tv/sickbeard$ exit
      exit
      parsnip@parsnip:~$ cd /media/store1/torrents/complete/tv/sickbeard
      -bash: cd: /media/store1/torrents/complete/tv/sickbeard: Permission denied
Lemon
  • 31
  • 1
    Surprisingly enough, a restart fixed the issue. I wasn't aware that a server based unix system needed a reboot for new groups/permissions to take full effect... apparently a reboot really does fix everything! – Lemon Mar 27 '13 at 18:16

2 Answers2

2

Answered by OP in a comment:

Surprisingly enough, a restart fixed the issue. I wasn't aware that a server based unix system needed a reboot for new groups/permissions to take full effect... apparently a reboot really does fix everything!

Lucio
  • 18,843
2

As an alternative solution: Restarting shouldn't have been necessary. Logging out (completely) and back in should have been sufficient.

Eliah Kagan
  • 117,780