Permission Denied error with explicit permissions given

General support for problems installing or using Deluge
Post Reply
derptart
New User
New User
Posts: 3
Joined: Sat Jul 09, 2011 3:50 am

Permission Denied error with explicit permissions given

Post by derptart »

Deluge v1.3.2
Libtorrent version ?? (how to know?)
Ubuntu Server 10.04 LTS

Installed deluge on Ubuntu Server to cooperate with actively running Samba file server (note that this is all on the same box).
Used the guide here (http://dev.deluge-torrent.org/wiki/UserGuide/ThinClient) to install deluge for Web UI using apt-get packages.
Am able to connect to Web UI in Firefox 5.0, Login, change settings (most of them, haven't tested them all yet), and add torrents manually.
I have a folder on my samba file server share for deluge to use (referenced here as '/example-folder' for simplicity sake). Inside it are four folders: 'torfiles' (AutoAdd), 'torfiles-backups', 'queued', and 'completed'. These folders have been added to the deluge Web UI preference settings.
Deluge-daemon runs as user 'deluge'.

The problem: Torrents are not automatically added when placed in the torfiles folder. Manually added torrents will not download and will give a "Permission denied: /example-folder/queued/torrent.file" error

/var/log/deluge/daemon/warning.log

Code: Select all

[WARNING ] 23:38:24 autoadd:72 Invalid AutoAdd folder: /example-folder/torfiles
/var/log/deluge/web/warning.log (does not seem to be related)

Code: Select all

[WARNING ] 23:38:25 config:361 Unable to open config file /home/deluge/.config/deluge/hostlist.conf.1.2: [Errno 2] No such file or directory: '/home/deluge/.config/deluge/hostlist.conf.1.2'
Resolve Attempts Include:
1) 'sudo usermod -aG sambausers deluge' (adding deluge to the sambausers group who have current group ownership on 'example-folder') [outcome = permission denial persists]
2) 'sudo chown deluge:deluge -R /example-folder' (somewhat desperate attempt to give sole access permissions to deluge on 'example-folder') [outcome = permission denial persists]

Permissions for /example-folder and sub-directories and files are 'drwxrwxr-x'.
The samba shared /example-folder is on an ext4 filesystem.
Each attempt included 'deluge@server:$ /etc/init.d/deluge-daemon restart' and a clearing of cache in the web browser for good measure.
I have no idea why it won't accept the permissions I have given it.

Input Welcome
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Permission Denied error with explicit permissions given

Post by Cas »

Are you able to login as deluge user and try to manually copy files to the samba share?
derptart
New User
New User
Posts: 3
Joined: Sat Jul 09, 2011 3:50 am

Re: Permission Denied error with explicit permissions given

Post by derptart »

That is strange... No, Cas, I do not seem to be able to view or touch or modify any files in that directory while as user deluge.

Edit: For testing sake, I rebuilt /example-folder within /home/deluge/ and put one .torrent file in /home/deluge/queued/torfiles to test the AutoAdd. Made sure ownership was again entirely belonging to deluge ('sudo chown deluge:deluge -R /home/deluge/example-folder') and then restarted the daemon and reloaded the Web UI and then everything began working as expected. This leads me to believe that somehow deluge is not being able to access the shared folder for some other reason. The exact samba share location is /mnt/shared-disk/
Ownership is as followed:
/mnt = root:root
/mnt/shared-disk = derptart:sambausers
/mnt/shared-disk/example-folder = deluge:sambausers (as mentioned in first post, setting this folder to deluge:deluge did nothing)
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Permission Denied error with explicit permissions given

Post by Cas »

its been a while since I used samba shares but I think you need to make sure the user uid's match
derptart
New User
New User
Posts: 3
Joined: Sat Jul 09, 2011 3:50 am

Re: Permission Denied error with explicit permissions given

Post by derptart »

If that is as simple as making sure 'ls -n /example-folder' is the same as the uid and gid in /etc/passwd for deluge user and group, then yes, they match.

sudo cat /etc/passwd

Code: Select all

...
deluge:x:1004:1005::/home/deluge:/bin/bash
...
sudo ls -n /mnt/shared-disk/example-folder

Code: Select all

drwxrwxr-x 2 1004 1005  4096 2011-07-07 21:13 completed 
drwxrwxr-x 2 1004 1005  4096 2011-07-07 21:14 queued  
drwxrwxr-x 2 1004 1005 16384 2011-07-08 23:14 torfiles  
drwxrwxr-x 2 1004 1005  4096 2011-07-07 21:15 torfiles-backups  
If you think this might be a Samba related issue, I can try my luck with the support community for Samba. I was hoping Samba wasn't the problem though :/

EDIT: Actually, I know for a fact that this problem is not related to Samba. I have a lightweight virtualbox setup running headless on the same machine and it is controlled by user 'vbox' who has the same access to another drive, which is also located in the same /mnt directory, and is used by samba. In other words this vbox user has the same privileges as deluge on the same machine, and is able to function correctly in accessing a nearly identically functioned directory. This rules out the speculation of Samba being the cause of this issue.
Post Reply