0

I have a headless torrent client (Transmission) which downloads files into /home/username/downloads with the username debian-transmission, in the group debian-transmission.

I've added the account username to the group debian-transmission (it's also in the group username), and chmodded the /home/username/downloads folder recursively to 770, but I still can't delete anything when logged in with the username account. The umask set on downloaded files by Transmission is 18, so I don't know if that has something to do with it. Regardless, I chmodded the files manually post-download.

ls -lad /home/username/downloads gives

drwxrwx--- 38 username debian-transmission 4096 2012-04-19 11:39 /home/username/downloads

and

ls -la /home/username/downloads/<a file in this folder that won't delete> gives

ls: cannot open directory /home/username/downloads/<a file in this folder that won't delete>/: Permission denied

I had a look at Why can't I delete a file where I have group write permissions on? but the answer wasn't particularly helpful.

I thought I had got my head round *nix permissions, but obviously not!

melat0nin
  • 183
  • 1
  • 11

1 Answers1

2

If you run

groups

before trying to delete the file, is debian-transmission listed?

If not, try

newgrp debian-transmission

and then once again try to delete the file. If this fixes it, you simply haven't logged in to the new group yet.

The group login happens with your next login shell, and if you run a GUI, the easiest way might be to restart it (or the computer, which will imply the first).

Daniel Andersson
  • 23,895
  • 5
  • 57
  • 61
  • Alternatively, an issue I have with rtorrent and deleting files if they're still open in rtorrent (if they're uploading/downloading or not) – Rob Apr 19 '12 at 15:56
  • @Rob: what is the issue? You should be able to delete the files, but rTorrent will certainly complain about them being missing if it tries to open the file descriptor (files currently open in rTorrent will actually only be "removed" in the sense that they are not visible from e.g. `ls`, but rTorrent will keep a hold on the data until it closes the descriptor and only then is the disk space in practice reclaimed as free). I don't think rTorrent recreates files unless specifically asked to, but I haven't done any controlled tests. – Daniel Andersson Apr 20 '12 at 06:17
  • I've just been unable to delete files while I've had rtorrent running. It's easy enough to pop in, close the torrent, and then delete the files. – Rob Apr 20 '12 at 23:32