Every time I try to run the bittorrent sync binary, downloaded from here, I get a permission denied error regardless whether try running it as my user or as root. In particular, I get

juan@server:~/.btsync$ ./btsync
-bash: ./btsync: Permission denied


root@server:/home/juan/.btsync# ./btsync
-bash: ./btsync: Permission denied

I've already changed permission of both btsync the folder containing it to 777. Also my user, juan, is the owner of both the folder and btsync.

This only seems to happen with btsync and not with other programs. I've tried re-downloading btsync. Last bit of, maybe, relevant info: a while back another user attempted (but messed up) to install btsync using apt-get which resulted not on btsync being installed, but this package which is not written by the same people and builds on btsync. I attempted to remove it as best as I could using

juan@server:~/.btsync$ sudo apt-get purge btsync*
juan@server:~/.btsync$ sudo apt-get --purge autoremove

but maybe something remains lingering somewhere. What else can cause permission denied errors; what can I try? Thanks in advance.

Edit: Here's the relevant output from ls


-rwxrwxrwx 1 juan juan 5957720 Jul 30 11:08 btsync

containing folder

drwxrwxrwx  2 juan juan 4096 Aug  7 10:08 .btsync

with the ".btsync" highlighted in green.

Edit 2: I downloaded the x64 version, here's the link. I think that it's the correct one for my architecture, here's what uname -a returns

Linux fileserver 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:02:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Edit 3: Here's what file btsync returns

btsync: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), BuildID[sha1]=0xff654e3f8d393a11bc42f4e23cd96478fdda613c, stripped

Edit 4: Binary, not script, thanks Eliah Kagan, as it's pretty transparent I'm new to linux.

  • Does btsync need root privileges? – s3lph Aug 7 '14 at 10:41
  • I don't think so, on other machines I run it as a normal user. Does this answer your question, or should I do something further to check? – jkn Aug 7 '14 at 10:46
  • @jkn execute file btsync in the directory you run it from and add the result. – s3lph Aug 7 '14 at 10:54
  • @EliahKagan see second edit. – jkn Aug 7 '14 at 10:55
  • @the_Seppi see third edit. – jkn Aug 7 '14 at 10:56

This seems to be permission related.

Your .btsync folder permissions seem right according to your file listing. But what about the underlying files and folders?

Verify that they are right or just remove the .btsync folder so that btsync can create a new one when you start it

Another possibility is be that your home partition is a different mount point from your / drive and mounted with the noexec flag. Which denies executing files on it.

You can verify this with the mount command that will list your mount points and the mount flags.

| improve this answer | |
  • Thank you! The home partition did have a different mount point and was mounted with the noexec flag! I remounted without the flag and it works perfectly. – jkn Aug 13 '14 at 15:06

where ever you are running this from hit ctl + h and show your hidden files. Find the folder called ".sync" remove this folder. If you have run btsync as root you may need to use the terminal and delete this folder with root permissions

sudo rm .sync/ -r

now move the btsync file you downloaded to your home folder. you shouldn't need to have this under the root folder. Run this again with the terminal in a normal user session in your home folder.

user@system:~$ ./btsync

this will recreate the ".sync" folder this time in your home directory and you will have to go back and remake all your shared keys.

now make sure you have access to all the directories you are trying to sync. Using the root account can screw up permissions with the other devices trying to sync files.

Note: btsync does not sync the folder it is running in. Once you run this file nothing will happen on it own you need to open a web browser and go to the local web site this application is hosting on your PC

Enter this in your broswer's URL bar:

from here you can create the sync keys for each folder and select the folders you want to have synced. If this is a laptop and you take this PC to a public network I highly advise you password protect the local web site this can be done during the initial setup and make sure to turn the firewall on.

A graphical firewall manager is gufw search for it in the ubuntu software center and click the switch to enable it. If someone were to access the web panel for btsync they could steal your data

I can also recommend not syncing your entire home folder with another Ubuntu PC as this can cause issues with your system.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.