Ubuntu - "don't Have Permissions To Write To The Selected Folder"


g0ltoof

Recommended Posts

I installed btsync on both machines, navigate to the web gui, when I select a folder, generate a secret, hit Add, I get "Don't have permissions to write to the selected folder."

 

I'm sure it has something to do with the btsync/home group permissions, I see ZERO documentation on how to address this for an ubuntu install.

 

All I want is to sync some local dirs with remote dirs.  Nothing fancy at all.  Using ubuntu 12.04

 

 

 

 

 

 

Link to comment
Share on other sites

I have no particular knowledge of the debian/ubuntu packagers, but it seems that the user running btsync has insufficient permissions to create the necessary files, such as .SyncID, SyncArchive, etc. You could take a look at /etc/passwd or /etc/group and see which groups might have been added by the btsync package or you just take a look at the btsync instance by running ps aux | grep btsync to see the username. You can then use usermod to change/add the btsync user and/or add him to your user group if necessary. 

A simple and dirty solution would just be to chmod 777 the directory you are trying to set up for syncing. However, this makes this folder accessible to every other user on your system.

Link to comment
Share on other sites

  • 2 weeks later...

at 1.2.82, I'm experiencing this error, even when chmodding the folder to 777

 

when I mount the map to /something I can add it in btsync.

not when I use /mnt/e/share/something.

 

Weird stuff

 

edit : had to restart btsync deamon after chmod.

Edited by Osiris
Link to comment
Share on other sites

I installed btsync on both machines, navigate to the web gui, when I select a folder, generate a secret, hit Add, I get "Don't have permissions to write to the selected folder."

 

I'm sure it has something to do with the btsync/home group permissions, I see ZERO documentation on how to address this for an ubuntu install.

 

All I want is to sync some local dirs with remote dirs.  Nothing fancy at all.  Using ubuntu 12.04

 

 

I suppose you installed the server version of the packages. During the installation, you were asked:

 

You can choose, if you want BitTorrent Sync to run as root (not recommended) or under it's own unprivileged credentials (user: btsync, group: btsync). WARNING: If you change this setting in an already running instance, you must take care of changing the ownership of all files in the managed folder shares in order to make sure that BitTorrent Sync will still be able to access and modify them.

 

By default the installer proposes to run the daemon with a dedicated unprivileged user. This obviously means, that the daemon has only access to files and directories readable for everyone. In addition the btsync daemon needs write access to all paths that will be included in the synchronisation.

 

So basically there are several different approaches:

 

  1. If you plan to let btsync synchronise several directory trees belonging to different users but do not care who will be the owner or creator of a file, you should give the user "btsync" read and write permissions to all involved files and directories and make sure that the respective users will also be able to read and write the files created by the btsync daemon. There are several ways to achieve this and it may depend on the access rights method implemented in the file system (UNIX permissions, ACL, etc.)
  2. If you plan to let btsync synchronise several directory trees belonging to different users and you want btsync to behave exactly like the user (that means preserving ownership and permissions), you cannot use the default instance managed by the installer package, but you must answer "No" to the first question "Do you want to define a default BitTorrent Sync instance?" and then create an manually maintained instance for every involved user by creating a dedicated configuration file with DAEMON_UID and DAEMON_GID set to the relative user credentials. 
  3. If you want only to replicate directory trees owned by the user "root", you should instead select to let the btsync daemon run under "root" credentials
  4. If you want only to replicate stuff in your home directory and your machine is a workstation, you are using the wrong package. Consider installing the package btsync-user instead of the package btsync. More information can be found here.

 

I hope that this helps a little.

Link to comment
Share on other sites

  • 7 months later...

Osiris:  Have you managed to successfully add your mounted directory as a btsync-gui "folder"?  I've been able to add local directories without issue, but when adding a mounted directory named in etc/fstab mapped to a NAS network share, I get the same permissions error - even after chmod 777 the directory.  The path is fine, as I have rw access to files in the mounted NAS directory, but btsync-gui still displays the permission error.

 

Martin

 

Link to comment
Share on other sites

I'm not sure, but somewhere I read that btsync can sync only local directories. But I'm not sure....

 

tuxpoldo:  Would you mind testing the functionality of syncing a mounted NAS share with your installation of btsync on Linux??  

 

On Win7, I have synced directories using both "mapped network drives" and the actual NAS network path for well over a year, syncing TBs worth of data without issue with btsync.  However, IMHO, Win7 is too unreliable and occasionally needs a reboot.

 

I really want to migrate to a Debian box dedicated to running btsync that uses my NAS as the sync media.

 

Martin

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.