You are not logged in.

#1 2016-01-10 00:09:26

jmgilman
Member
Registered: 2012-10-12
Posts: 19

File permission issues when syncing with BTSync

Hello,

I have BTSync successfully setup and have the service running under the btsync user. I setup a separate /home directory for syncing and created a folder called 'project' that I am using to sync some programming stuff. In order to allow the btsync user to manage the syncing as well as still allow myself to read/write to files I set the permissions as such:

sudo mkdir /home/btsync/projects
sudo chown -R btsync:btsync /home/btsync
sudo chmod -R 2775 /home/btsync
sudo usermod -a -G btsync josh

I tested the setup by creating and syncing a test text file. The first issue I ran into is that when the btsync user writes (syncs) the test file to the 'project' directory it does so without the 775 permissions (seems to be 755 by default). However, even after manually setting the new file to 775:

sudo chmod 775 test.txt

I still get permission denied when attempting to write to the file. So, two questions:

1) How do I force newly created files to have group read/write (775)?
2) Why was I still getting permission denied even though I added my account to the btsync group?

Any feedback is appreciated. Thanks.

Last edited by jmgilman (2016-01-11 20:44:59)

Offline

#2 2016-01-10 00:49:25

jmgilman
Member
Registered: 2012-10-12
Posts: 19

Re: File permission issues when syncing with BTSync

I fixed the second issue in regards to not being able to edit the file. I guess I needed to reboot in order for the group change to take effect.

However, I still have the first issue with forcing the 775 on new files.

Offline

#3 2016-01-11 19:04:59

jmgilman
Member
Registered: 2012-10-12
Posts: 19

Re: File permission issues when syncing with BTSync

Bump. Any thoughts?

Offline

#4 2016-01-11 21:05:45

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: File permission issues when syncing with BTSync

Bumps are bad, mmmkay?


But I'm an enabler, so I'll chime in anyway. AFAIK, the best you can do is set the umask of btsync to 002, which would cause files to be created as 664 (rw-rw-r--) and directories as 775. I don't know how to have files created with executable bit set by default.

But files and directories created by your user will still default to 644 and 755 respectively. You could change your umask too, but that doesn't seem like a good idea (sledgehammer, nail, etc).

Last edited by alphaniner (2016-01-11 21:16:02)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB