hdevtools icon indicating copy to clipboard operation
hdevtools copied to clipboard

bind: permission denied

Open jonathanmcelroy opened this issue 9 years ago • 8 comments

I am running xubuntu 14.04 as guest in VirtualBox in a Windows 8 host. To keep my documents synchronized, I am using a virtualbox shared folder. However, when running any hdevtools command in the shared directory, I get the error messge "hdevtools: bind: permission denied (Operation not permitted)". The given file path can be any string and the message appears.

permissions info: hdevtools binary is chowned by my user. shared folder is chowned by root with group vboxsf, which my user is a member of.

Running hdevtools in any standard directory works as expected.

jonathanmcelroy avatar Dec 11 '14 00:12 jonathanmcelroy

Since filing this report, I have discovered that you cannot create links in a shared folder in VirtualBox. Could that be the issue?

jonathanmcelroy avatar Dec 16 '14 02:12 jonathanmcelroy

Did you find out about the issue? I am suffering from this now too. The problem persists on reboot.

tusj avatar Feb 23 '15 00:02 tusj

It seems that it is the vim-hdevtools plugin which is doing something funny. Invoking hdevtools on the command line poses no problem, but with vim it does not work..

tusj avatar Feb 23 '15 01:02 tusj

hi, did anyone figure this out? i am trying to write an atom plugin that uses hdevtools to display types and am hitting the same problem. It works fine from the command line...

ranjitjhala avatar Jun 20 '15 22:06 ranjitjhala

I never figured out how to fix it. I decided it was not worth the effort to fix, and decided to install Ubuntu as a dual-boot.

jonathanmcelroy avatar Jun 21 '15 00:06 jonathanmcelroy

I think it had to do with the fact that hdevtools creates a either a named socket, soft link or hard link in the same directory as the file, I don't remember which exactly. VirtualBox decided that it is not worth the effort to have that type of file translate between Unix and Windows, so they forbid it in the shared directory.

jonathanmcelroy avatar Jun 21 '15 00:06 jonathanmcelroy

Thanks! Yes I think I have a related problem which I can bypass using the -a option.

On Jun 20, 2015, at 5:44 PM, Jonathan McElroy [email protected] wrote:

I think it had to do with the fact that hdevtools creates a either a named socket, soft link or hard link in the current directory, I don't remember which exactly. VirtualBox decided that it is not worth the effort to have that type of file translate between Unix and Windows, so they forbid it in the shared directory.

— Reply to this email directly or view it on GitHub.

ranjitjhala avatar Jun 21 '15 02:06 ranjitjhala

I encountered the same issue when trying to use Vim with vim-hdevtools in a Windows FAT drive mounted under Linux. I was able to solve it by having hdevtools create the socket under my home directory rather than in the current directory. I had to do two things directly in vim-hdevtools/autoload/hdevtools.vim to achieve this:

  • Add this line before the return l:cmd line in both hdevtools#build_command and hdevtools#build_command_bare functions:

    let l:cmd = l:cmd . ' --socket=$HOME/.hdevtools.sock'

  • Change all instances of expand('%') to expand('%:p')

The second step is necessary because, as it says in the hdevtools README, "when telling hdevtools to check a Haskell file, paths are relative to the path of the background process, not your current directory". So we need to specify the full path of the file %:p, rather than just the file name %.

@ranjitjhala What is the -a option?

digital-carver avatar Aug 13 '15 22:08 digital-carver