Can't download to custom location - permission issue

General support for problems installing or using Deluge
trueotacon
Member
Member
Posts: 15
Joined: Tue Jan 26, 2021 7:23 pm

Re: Can't download to custom location - permission issue

Post by trueotacon »

So, at the end it's working BUT I don't really know why and I would like to understand.

I think the last action that I've done is

Code: Select all

sudo chmod g+x /home/otacon
so, if I'm not wrong, I have set enable execution to my home folder for all the groups. Why? Deluge need to write not execute programs in my directory. And even if the solution was to set the same parameter to /home/otaco/tors folder instead of home folder, why give execution permission when the program need only "rw"?

In this moment the parameters of my folders are

ls -lF /home/otacon/tors

Code: Select all

drwxrwxrwx 2 deluge deluge       4096  4 giu 08.00 temp/
drwxrwxrwx 2 deluge deluge      20480  4 giu 08.00 tors/
ls -lF /home/otacon/tors NOW

Code: Select all

drwxrwxrwx 5 deluge deluge 274432  4 giu 05.08  tors/
and this is my starting point, the OLD parameters, visible in the first point

Code: Select all

drwxrwxrwx 4 deluge deluge 274432 10 mag 17.57  tors/
So the permission parameters on the "tors" folder are the same.
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Can't download to custom location - permission issue

Post by mhertz »

First, I'd personally as said remove otacon group from deluge user, and run 'sudo chmod g-x /home/otacon' and then 'sudo chmod o+x /home/otacon'. Honestly not to happy about suggesting that either(execute permission for others on home dir), and possibly would be better as is, but just very much neither fan of assigning extra group memberships to deluge user, so that must be the lesser evil I'm thinking, but others please correct me if wrong of-course. Still though, it's "only" folder execute bit here, we're talking about.

About your question, as said it's not enough to adjust the permissions on one folder if it's located into one or more other folders, which in that case these other lower located folders, here /home and /home/otacon, needs execute bit set to be able to get to your download folder, and so isn't about execute permission for executable files, but for folders that bit refers to instead traversal rights e.g to be able to 'cd' into it, and which is needed to use it from other means.
trueotacon
Member
Member
Posts: 15
Joined: Tue Jan 26, 2021 7:23 pm

Re: Can't download to custom location - permission issue

Post by trueotacon »

Ok, I have REMOVED deluge user from otacon group.
Deluge user have only deluge group
Otacn (my user) have wheel, deluge, otacon

I have done what you seggested, I removed group permission to execute and enabled others perission to execute

Code: Select all

sudo chmod g-x /home/otacon
sudo chmod o+x /home/otacon
Now the situation is the same as yesterday, deluge can't write into home folder.

Here are details of otacon folder now

Code: Select all

drwx-----x  otacon otacon
And is not working anymore
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Can't download to custom location - permission issue

Post by mhertz »

If like that then should work, and does here, I just retested now again.

I know you stated so, but just to rule miscomunication fully out, then could you please post output of these too:

Code: Select all

groups deluge
ls -ld /home/otacon/tors
ls -ld /home
ps aux | grep [d]eluge
If what you said you did, is only change done, and now breaks, then would mean otacon group still added to deluge user(checked with 'groups deluge').

Btw, you don't need restart deluged or deluge-web everytime messing with permissions - only is needed when changing actual deluge settings, and not even always then.

Edit: If removing otacon group from deluge user, then would require you to restart deluge to take effect, so if didn't do that, then please try this. My comment before about not needing restart deluge, was just about chmod and chown commands.
trueotacon
Member
Member
Posts: 15
Joined: Tue Jan 26, 2021 7:23 pm

Re: Can't download to custom location - permission issue

Post by trueotacon »

Code: Select all

groups deluge                                                 
deluge

~ >>> ls -l /home/otacon | grep tors
drwxrwxrwx 5 deluge deluge 274432  4 giu 05.08 tors

~ >>> ls -l / | grep home
drwxr-xr-x   4 root root  4096 23 gen 05.55 home

~ >>> ps aux | grep [d]eluge
zsh: no matches found: [d]eluge

~ >>> ps aux | grep deluge
[1] deluge       549  0.0  0.4  81804 66584 ?        Ss   giu02   0:37 deluge-web
deluge     22414  1.9  0.5 587600 97024 ?        Ssl  giu03  17:28 /usr/bin/python /usr/bin/deluged -d
otacon     28630  0.0  0.0   6772  2344 pts/0    S+   12:26   0:00 grep deluge

~ >>> ps aux | grep deluged
deluge     22414  1.9  0.5 587600 97024 ?        Ssl  giu03  17:28 /usr/bin/python /usr/bin/deluged -d
otacon     28632  0.0  0.0   6772  2396 pts/0    S+   12:26   0:00 grep deluged
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Can't download to custom location - permission issue

Post by mhertz »

Thanks.

Was as you said, sorry. Can you please try restart deluged and deluge-web again and retest.

Code: Select all

sudo systemctl stop deluged deluge-web
sudo systemctl start deluged deluge-web
If still not working, then i'm sorry I don't understand reasoning, as should work, and does here, with those exact permissions and deluge user, but anyway then others would have to help you instead, and for getting working again in mean time i'd guess you'd need revert to your last reported success scenario, so running 'g+x' and 'o-x' for otacon user dir and readd otacon group to deluge user,
Last edited by mhertz on Fri Jun 04, 2021 11:16 am, edited 1 time in total.
trueotacon
Member
Member
Posts: 15
Joined: Tue Jan 26, 2021 7:23 pm

Re: Can't download to custom location - permission issue

Post by trueotacon »

Yeah, now it's working. I mean, restarting deluged service has never change the situation, but in this case it has. Now it's working. So, thank you! I will save this conversation for future issue.

Maybe, someone need to update or add few things to the arch wiki page of deluge
mhertz
Moderator
Moderator
Posts: 2195
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: Can't download to custom location - permission issue

Post by mhertz »

Awesome, and you're very welcome :)

Indeed that was specifically needed here to refresh the outdated credentials stored in memory of the deluge user.

I'ts easy enough to add to the arch wik btw, and possibly i'll also take a quick peek of what's already there sometime later, as haven't read that deluge section in years I believe, but do have an account for the arch wiki as remember did some additions aaround 10 years ago roughly for another piece of software.

Anyway, as said, glad you figured it out :)
Post Reply