gcr Posted May 5, 2013 Report Share Posted May 5, 2013 Hello!On Linux, btsync doesn't set the "other users' execute" permissions on folders that it creates on remote clients:$ ls -ltotal 8-rw-r--r-- 1 gcr gcr 146 Apr 30 20:42 index.htmdrwxr-xr-- 2 gcr gcr 4096 May 5 11:35 lights-ustreamwhere 'gcr' is my username. Can I get btsync to set the other executable bit? Without this, my web server gives a "403 Forbidden" error whenever someone browses that folder because it's running as a different user.For the record, here are the permissions at the source:$ ls -ltotal 4-rw-r--r-- 1 my-username users 146 May 1 21:11 index.htmdrwxr-xr-x 1 my-username users 148 May 5 11:34 lights-ustream Quote Link to comment Share on other sites More sharing options...
jabr Posted June 17, 2013 Report Share Posted June 17, 2013 I suspect the problem is a bug in the function below (in pseudocode from disassembly). It seems to take a file permission set as an argument and return a specific permission set based on that. The return value is then used as part of a call to chmod.I'm not certain what the intended logic is, but it seems that an input that is user writable:input & 0x80 != 0and group executable:input & 0x8 != 0results in a return value of 774, which is suspicious since the bug we see is a missing the other executable bit. A return of 775 would make more sense.function sub_4c013a { input = rdi; result = 0x0; if ((input & 0x80) != 0x0) { result = 0x1b4; } else { if ((input & 0x1) != 0x0) { result = 0x124; } } if ((input & 0x8) != 0x0) { result = result | 0x48; } return result;}I suspect this:result | 0x48 # 0110should be this:result | 0x49 # 0111 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.