Permission Problems // BTSync

Permission Problems // BTSync

Postby iamola » Thu Jul 05, 2018 8:56 pm

I use Resilio / BT Sync a lot. Because of that, i get permission problems, a lot!
This is not something new, but its gotten bad because i have most of my files on Sync.

I have noticed when i try to FTP into the server to copy or move files to a folder that is in Sync, i cannot. I get a permission error. Any help with this or why this is occurring ?

Thanks
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: Permission Problems // BTSync

Postby iamola » Thu Jul 05, 2018 9:45 pm

Tried editing the groups but i cannot find usermod
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: Permission Problems // BTSync

Postby Jocko » Fri Jul 06, 2018 7:25 am

Hi iamola,

Resilio does not support fully linux account privilege.

Currently its behaviour :
- on a new sync file, Resilio set permissions and owner according to the source file
- it does not update permissions and owner on the sync file if you change them on the source file

So to fix your issue, you need to run regularly this chmod command
Code: Select all
chmod -R a=rwX /path/to/your/syncfolder
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Permission Problems // BTSync

Postby iamola » Mon Jul 09, 2018 11:23 pm

Is there a way to add a user to a group? This will fix the issue if i can add root to my account group.
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: Permission Problems // BTSync

Postby Jocko » Tue Jul 10, 2018 8:01 am

Hi iomala
iamola wrote:This will fix the issue if i can add root to my account group.
No this won't fix your issue as root has already all privilege. So even if you add root, there will be no change.
iamola wrote:s there a way to add a user to a group?
Currently no and as each rebooting, the firmware resets group settings.
iamola wrote:I have noticed when i try to FTP into the server to copy or move files to a folder that is in Sync, i cannot.
Please can you check what are the permissions on the source file and also what are permissions on folder destination in such case.

Note: with proftpd you can not login with the root account
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Permission Problems // BTSync

Postby iamola » Tue Jul 10, 2018 7:28 pm

So the folder has a permission of root root. Meaning root is the user and root is the group.
But since i am using FTP as myusername, the file has permission of myusername myusername.
So i had to change the group of the folder to myusername and then i can transfer files into the folder using FTP.

Which is mainly the problem.
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: Permission Problems // BTSync

Postby Jocko » Wed Jul 11, 2018 7:22 am

Up to now, it is the expected behaviour.

Ok you posted information about file owner but it is not enough. Permissions (rwx) are set according to the owner, group and other. So please to post this information.
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Permission Problems // BTSync

Postby iamola » Wed Mar 13, 2019 8:08 pm

The problem would be fixed if this happened.

Every user created through the app is also added to the group "root"
Which would fix most of Resilio's problems. Resilio uses root as the user when it creates something. So the account is root under group root.
If i created an account and used it to FTP i cannot do nothing in the folder. If my account had a group of "root" also, i think that would fix the issue.
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Re: Permission Problems // BTSync

Postby Jocko » Thu Mar 14, 2019 9:15 am

Hi iamola,

iamola wrote:Every user created through the app is also added to the group "root"
I do not think use this way as this means this user would get the same rights as root user !

Currently resilio does not manage permissions and when it creates a folder for example, permissions are 755 (write permissions only for owner) and owner is root. Resilio is a locked app (no open source) and then not so easy to change its behaviour.

What you can try is to change umask value before running resilio, so do
Code: Select all
killall btsync
umask 0 && /usr/local/sbin/btsync --config /rw_fs/etc/btsync.conf
and see if a new file or folder created by resilio have full permissions

It seems to work as expected on my side

Please to note resilio must not be used as a backup tool because permissions and owner are never preserved!
Jocko
Site Admin - expert
 
Posts: 11367
Joined: Tue Apr 12, 2011 4:48 pm
Location: Orleans, France

Re: Permission Problems // BTSync

Postby iamola » Thu Apr 02, 2020 2:50 am

I still think we need to fix this permission issue. Not only with btsync but folders created by Twonky also have the same issue.
I created a folder via OSX Finder and it names the owner and group as nobody nobody
Mean while another has my username as the owner and group

Just weird
iamola
Donator VIP
Donator VIP
 
Posts: 90
Joined: Thu Sep 11, 2014 1:40 pm

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 2 guests