0

My Pi 3 is running 2 services: transmission and amule

  • transmission is using "pi" user

  • amule is using "amule" user

I have one problem:

I finished amule installation with folder (/media/pi/element/torrent-complete), but it don't work with error in Amule Log and return to default folder.

 2016-07-01 20:56:33: Error: Directory '/media/pi/element/torrent-inprogress' couldn't be created (error 13: Permission denied)
!2016-07-01 20:56:33: ERROR: Error accessing directory. Could not create the temp directory at '/media/pi/element/torrent-inprogress'.
!2016-07-01 20:56:33: Attempting to use default directory at location 
!2016-07-01 20:56:33: '/home/amule/.aMule/Temp'.
 2016-07-01 20:56:33: Error: Directory '/media/pi/element/torrent-complete' couldn't be created (error 13: Permission denied)
!2016-07-01 20:56:33: ERROR: Error accessing directory. Could not create the incoming directory at '/media/pi/element/torrent-complete'.
!2016-07-01 20:56:33: Attempting to use default directory at location 
!2016-07-01 20:56:33: '/home/amule/.aMule/Incoming'.

enter image description here

Can anyone help to support this issue? I want to grant user "amule" can access to /media/pi/element. Thanks in advance.

1

Create a group for the users that you want to share the directory:

$ sudo groupadd mediagroup

Then change the directory's group and its parent to the group you just created, and make sure it's read/write/executable by any users in that group:

$ sudo chgrp mediagroup /media/pi
$ sudo chgrp mediagroup /media/pi/element
$ sudo chmod 770 /media/pi
$ sudo chmod 770 /media/pi/element

Finally, add your two users to that group:

$ sudo adduser pi mediagroup
$ sudo adduser amule mediagroup

Here's a useful doc for more information about Linux permissions

| improve this answer | |
  • Dear, your solution seems can solve the problem. But when you create new user group and assign to these folders => It will affect to transmission and amule services or not? It may cause another problem :( – Tran Duoc Hon Jul 2 '16 at 8:43
  • It shouldn't cause another problem, assuming amule is creating files in /media/pi/element. Those files will be owned / modified by amule only. You might see files that are readable by amule but not by pi or vice versa, but as long as those files are used by only one of the users, ownership shouldn't be a problem - the owner of the file will create/modify it. – user3486184 Jul 2 '16 at 8:46
  • Dear bro, I followed your guide, but it does not work as my below comment. Can you help to check more :( – Tran Duoc Hon Jul 2 '16 at 12:25
1

I never change the default permissions on the /media/pi directory, I re-mount all my external USB (NTFS formatted) drives for multimedia storage (plex server, samba etc) under a new /disk directory, make the required fstab entries and adjust the file systems permissions accordingly. It worked well for me :-)

umount /media/pi/Elements
mkdir /disks
mkdir /disks/Elements
blkid /dev/sda1
/dev/sda1: LABEL="External Drive" UUID="C6F00DBAF00DB22B" TYPE="ntfs" PARTUUID="1d9315eb-01"

vim /etc/fstab
UUID="C6F00DBAF00DB22B" /disks/Elements ntfs defaults,auto,rw,nofail 0 1

mount /disks/Elements
df -Ph
| improve this answer | |
0

Your solution did not work for me. I already tried but the problem still exists. Can you help to check? Thanks.

enter image description here

| improve this answer | |
  • I can't explain why, but /media/pi/element is owned by pi.pi and is mode 700. It should be owned by amule.mediagroup and be mode 770. Try doing "sudo chown amule.mediagroup /media/pi/element" and then "sudo chmod 770 /media/pi/element" – user3486184 Jul 4 '16 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.