Files and Folders created with wrong permissions
-
- Posts: 6
- Joined: Wed Jan 15, 2014 4:42 pm
Files and Folders created with wrong permissions
This was working fine for a while, but now, Transmission creates folders and files in my incomplete folder with 755 permissions. My umask in settings.json is 2 which is equivalent to 775. I have also changed it to 0 for testing purposes, which is equivalent to 777, but 755 permissions are always set. Anyone have any clue as to why this might be happening and what I can do to fix it?
Re: Files and Folders created with wrong permissions
Are you sure files are created with 755 permissions? I could believe in directories having this mode, but files should have at most 666 (i.e. no executable bit). Maybe the filesystem of ours is the cause here? Like, if it's smbfs/cifs/fat/ntfs and you mount it with specific user_mode/dir_mode/fmask/dmask/umask/umode flags?..
Last edited by mike.dld on Fri Jan 17, 2014 5:32 am, edited 1 time in total.
-
- Posts: 6
- Joined: Wed Jan 15, 2014 4:42 pm
Re: Files and Folders created with wrong permissions
Here is an example of a folder within my incomplete:
drwxr-xr-x 2 debian-transmission debian-transmission 4096 Jan 16 21:51 File.1
And the files within that folder:
-rw-r--r-- 1 debian-transmission debian-transmission 4689054657 Jan 16 21:52 File.1.mkv.part
-rw-r--r-- 1 debian-transmission debian-transmission 759 Jan 16 21:52 File.1.nfo.part
So it looks like you are on the right path, the folder is 755 and the files are 644.
How is this supposed to work? Shouldn't my folder be drwxrwxr-x when my umask in settings.json is set to 2?
drwxr-xr-x 2 debian-transmission debian-transmission 4096 Jan 16 21:51 File.1
And the files within that folder:
-rw-r--r-- 1 debian-transmission debian-transmission 4689054657 Jan 16 21:52 File.1.mkv.part
-rw-r--r-- 1 debian-transmission debian-transmission 759 Jan 16 21:52 File.1.nfo.part
So it looks like you are on the right path, the folder is 755 and the files are 644.
How is this supposed to work? Shouldn't my folder be drwxrwxr-x when my umask in settings.json is set to 2?
Re: Files and Folders created with wrong permissions
If should be 775, that's correct, and it looks like a defect. But before we settle on this (and create a ticket at https://trac.transmissionbt.com/), are you using the latest version which is 2.82 at the moment? And if not, would you mind trying it out first?
EDIT: I just tried it myself, and setting umask to 2 works just fine with 2.82 and GTK+ client.
EDIT: I just tried it myself, and setting umask to 2 works just fine with 2.82 and GTK+ client.
-
- Posts: 6
- Joined: Wed Jan 15, 2014 4:42 pm
Re: Files and Folders created with wrong permissions
This was working just fine for a while by creating the folders with 775 perm, and then all of a sudden, it started creating at 755.
I am on 2.82 on a headless Ubuntu server running the web client.
I am on 2.82 on a headless Ubuntu server running the web client.
Re: Files and Folders created with wrong permissions
Nothing happens all of a sudden, there is always a reason. And if you didn't change anything related to Transmission setup, it only means that something else on your system has changed. This could include filesystem, or mount options, or who knows what else.
Out of curiosity, lets try setting umask to some other value. For example, 63 (077), so that created files and directories should have 600 and 700 permissions respectively. If that doesn't work either then something may be wrong with settings.json file (invalid umask value type, like string instead of number?).
Out of curiosity, lets try setting umask to some other value. For example, 63 (077), so that created files and directories should have 600 and 700 permissions respectively. If that doesn't work either then something may be wrong with settings.json file (invalid umask value type, like string instead of number?).
-
- Posts: 6
- Joined: Wed Jan 15, 2014 4:42 pm
Re: Files and Folders created with wrong permissions
Thanks for the reply. I have changed the umask setting to 63. Here is what I get now:
For the folder
drwx------ 2 debian-transmission debian-transmission 4096 Jan 19 13:21 Folder1
And the files
-rw------- 1 debian-transmission debian-transmission 92 Jan 19 13:21 File1.txt
-rw------- 1 debian-transmission debian-transmission 18863220377 Jan 19 13:23 File2.mkv.part
So indeed, I am getting 700 for the folder and 600 for the files as you predicted.
For the folder
drwx------ 2 debian-transmission debian-transmission 4096 Jan 19 13:21 Folder1
And the files
-rw------- 1 debian-transmission debian-transmission 92 Jan 19 13:21 File1.txt
-rw------- 1 debian-transmission debian-transmission 18863220377 Jan 19 13:23 File2.mkv.part
So indeed, I am getting 700 for the folder and 600 for the files as you predicted.
-
- Posts: 6
- Joined: Wed Jan 15, 2014 4:42 pm
Re: Files and Folders created with wrong permissions
To test again, I set the umask setting back to 2, and my folders are still 755 (instead of 775) and files are 644.
-
- Posts: 6
- Joined: Wed Jan 15, 2014 4:42 pm
Re: Files and Folders created with wrong permissions
Right now my incomplete folder is 770.
drwxrwx--- 4 myuser debian-transmission 20480 Jan 19 13:30 incomplete
drwxrwx--- 4 myuser debian-transmission 20480 Jan 19 13:30 incomplete
Re: Files and Folders created with wrong permissions
The only thing I could think of now is running transmission-daemon under strace (as debian-transmission user) and then looking for umask/mkdir/open/chmod calls (actually, there should be no chmod calls). Do you know how to do that or do you need more detailed instructions?
Or maybe someone else has better suggestions...
Or maybe someone else has better suggestions...