Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Does Not Have Permission To Access This Folder #3

Closed
pcjonathan opened this issue Dec 3, 2015 · 6 comments
Closed

Sync Does Not Have Permission To Access This Folder #3

pcjonathan opened this issue Dec 3, 2015 · 6 comments

Comments

@pcjonathan
Copy link

As this seems to be the up-to-date repo, I'd like to lodge this issue here too as it's causing me problems with syncing anything outside my home directory (i.e. /home/pcj works fine, but anything under /media/ is hit and miss)

tuxpoldo#182

Snip from (my thread in the BTSync forums)[http://forum.bittorrent.com/topic/34641-sync-does-not-have-permission-to-access-this-folder/]:

I recently upgraded from 1.4 to 2.0 on my Debian server box. When attempting to recreate my 1.4 sync folder in 2.0, I am getting the error "Sync does not have permission to access this folder".

I double checked, and Sync does have permission for this folder. The daemon is running as the same user it was in 1.4. If I make a 1.4 style sync folder, it appears to have no issue reading the data and no error is thrown.

Unfortunately this is my "target" box for some one way syncing from a remote host, so I need to be able to add the key from my remote server. Even using the 1.4 style key, it throws permission errors.

After some troubleshooting with the btsync support team, we determined it was due to the "directory_root" property that is found in the debconf-default.conf file in the webui section. Removing this property fixed this error.

Here is what the support team said in regards to this property:

Check please your config. Most likely you'll find there "directory_root" (or "dir_whitelist") parameter.
This parameters specify the locations where Sync can create folders. Try to remove these parameters.

By the way, this is not and official repository and as I understand the repository maintainer included this parameter in the default config.

Another potential fix is to add this to the reconfigure options and specify what it is for. Maybe like, "Add the following folder(s) to the directory whitelist"

I gave removing it a go and it works for me, but I'm well aware that'll be overwritten on the next upgrade so a permanent fix would be great.

@Silvenga
Copy link
Owner

Silvenga commented Dec 5, 2015

Sorry about the delay, @pcjonathan, didn't get a notification on this issue.

If you set the "Start path for the web interface" option to / using dpkg-reconfigure btsync, the configuration script will omit the directory_root option from the configuration file. Would this mitigate your problem?

@Silvenga
Copy link
Owner

@pcjonathan I'm going to close this issue for now. If the above solution doesn't help please feel free to reopen.

@dadatuputi
Copy link

The dpkg-reconfigure approached solved this for me, but I think default behavior should be to make the start path for the web interface be /, since the default behavior is not intuitive.

@Silvenga
Copy link
Owner

@elBradford

The way the logic is setup is as follows:

If user is root -> default at /.
If user is btsync -> default at /mnt.
If user is a system user -> default at /mnt.
If user is a normal user -> default at the user's home directory.

I'm thinking all non-system users should default at their home directories, else default at /. What do you think would be more intuitive?

@dadatuputi
Copy link

The issue I have is that the directory_root incorrectly gives permission denied errors; the error led me to believe that it was a filesystem permission error (which it wasn't). If the error read instead, "Your btsync directory_root setting doesn't allow you to access that folder" it would make more sense. I think the software is making assumptions that the users will follow your logic outlined above, but there's no attempt to educate them on this, and in my opinion it's not intuitive.

@Silvenga
Copy link
Owner

I think the software is making assumptions that the users will follow your logic outlined above, but there's no attempt to educate them on this, and in my opinion it's not intuitive.

Unless Bit Torrent makes the change, best I can do is add this to the FAQ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants