Menu

Ubuntu: Directory in VeraCrypt-Container cannot be setup as network accessible

2018-06-04
2018-06-07
  • Clemens M. Hürten

    For some very good reasons I need to have a directory placed within a VeryCrypt volume / container, which should be accessible via net usershare to one other computer in order to exchange high sensible data. The Ubuntu machine should exchange data with a windows machine, while windows machine may read, write and erase. It is not necessary, that the Ubuntu machine has access to the windows machine.

    It seems not to be possible, to set up the directory as netdrive! Veracrypt volumes and container are mounted at /media/veracryptX/.... whereas X is the number of the slot in VeraCrypt, where the volume / container is mounted. It is not possible to establish a connection to e.g. /media/veracrypt1/test-directory.

    I have tried this with /dev/mapper/veracrypt1/test-directory, but no success.

    Of course I made shure, that the test-directory belongs to the user-group sambashare and that it is correctly defined by "net usershare add" entry. - No success!

    Is it impossible to set the directory to net access because of a special way, how VeryCrypt does the mounting of its volumes / containers within the Linux system?
    Does anybody have tried, to set a directory within VeraCrypt container to net access and did succeed? Then please tell me, how did you establish this!

     

    Last edit: Clemens M. Hürten 2018-06-04
  • Adrian Kentleton

    I am a bit of a loss to understand your problem, for I cannot reproduce what I think it is.

    Can you clarify: you want to create a folder in a mounted veracrypt volume on Linux, that users can have read/write access to from a Windows PC?

    I have no problem with this, on Linux Mint 18.1, from a Windows 7 PC.

    I can create a new folder eg /media/veracrypt1/new, and from within Nemo (File Manager) use 'Sharing Options' to set the options and create the necessary permissions. Or, in a terminal, run sudo system-config-samba to do the first bit, and chmod to do the second.

    For system-config-samba to work, you have to create the (empty) file /etc/libuser.conf (use sudo touch /etc/libuser.conf).

    Have you tried these?

    It helps if you have the same accounts on both machines.

    What error messages are you getting, when you try to access the directory within the veracrypt mounted volume, from Windows?

     

    Last edit: Adrian Kentleton 2018-06-04
  • Clemens M. Hürten

    Hi Adrian!
    Thank you for your quick answer! I am a absolute beginner in Linux and I have difficulties to understand and use samba functions. My main knowledge source is the german forum ubuntuusers.de

    It makes me happy, when you tell me, that my wish is realistic and you have such solution running on your machines. It gives me hope, I can realize my wish!

    You have asked:

    Can you clarify: you want to create a folder in a mounted veracrypt volume on Linux, that users can have read/write access to from a Windows PC?

    My answer: Yes exact that's what I want to do!

    On Lubuntu, I have neither Nemo nor Nautilus as filemanager. Both have the ability, to define dynamically shared folders. Samba and net usershare define netshared directory and files on administrative basis. (This was told in the forum, I mentioned above.)

    I have Lubuntu installed (which comes without samba extensions). Therefore I have installed these extensions (about 30 MB) and not Nautilus (about 90MB+). After I observed the problems to share the folder, I have installed Nautilus. But in Nautilus I could not see on right click the menu point 'Sharing Options'. Therefore I had to focus on definitions via net usershare and in the PCManFM-Filemanager, which comes with Lubuntu.

    You have asked:

    What error messages are you getting, when you try to access the directory within the veracrypt mounted volume, from Windows?

    It tells me, that the network path or the filenames are not accessible (=my translation from german) The same message appearing, when IP-adress would be incorrect etc. But I can access other folders, when I give them net access the same way, I have given to the folder within VeraCrypt volume / container.

    You tell me:

    For system-config-samba to work, you have to create the (empty) file /etc/libuser.conf (use sudo touch /etc/libuser.conf).

    No I have not tried this. But now I did, but no success! - Here my translation of the Windows error message:
    No access to \192.168.178.36\media\veracrypt4\Test-ext4
    Error Code 0x80070035
    The path in the network could not be found

    It seems, that the lack of accessability of my shared folder is not a problem with VeraCrypt but of my lack of knowledge, to set up successfully a shared folder on Lubuntu.
    On the other hand: Why can I access any other folder but only the folders within VeraCrypt volumes / containers are not accessable? Only this fact let me post my problem in this forum.

    Still any hints for me?

     
  • Adrian Kentleton

    This is just a quick response, there's one obvious possible problem in what you've posted: I'll look in more detail at what else you've said later today.

    If you created a shared folder 'Test-ext4' in your Veracrypt mount, then its default 'share name' is (unless you consciously changed it) 'Test-ext4'! So, the network path to it is just eg '\\192.168.178.36\Test-ext4' (or \\YourPCName\Test-ext4).

     

    Last edit: Adrian Kentleton 2018-06-05
  • Clemens M. Hürten

    Hi Adrian!
    Thank you very much for your hint. I have tried it, but sorry... I had no success.

    Since my first request, I have followed your hint from your post above and did create the empty file /etc/libuser.conf

    Then I tried the pathes
    \192.168.178.36\media\veracrypt4\Test-ext4
    and
    \192.168.178.36\dev\mapper\veracrypt4\Test-ext4
    and now
    \192.168.178.36\Test-ext4

    Further simply try and error:
    \192.168.178.36\veracrypt4\Test-ext4

    Nothing works!

    And I can connect to a shared folder "Neu" which is located at /home/clemens/Neu
    Therefore I am shure, that the network connection is well functioning. There must be a strange thing happening, that I cannot connect to the folder Test-ext4.

    I try to discuss this problem in the German forum Ubuntuusers but til now I have not got an answer: [https://forum.ubuntuusers.de/topic/netusershare-im-dateimanager-von-lubuntu-anwen/#post-8977337]
    Allthough I am aware, that this is a VeryCrypt discussion and not something about Linux, I am hopefull, to get the real helpfull answer here. Thank you in advance!

    PS:
    I just remember, that I have used the path \media\veracrypt4\Test-ext4 when setting up the "net usershare". Now I have controlled /var/lib/samba/usershares/ and the above mentioned path was defined there. I changed it to /Test-ext4 and then did Samba restart with "sudo smbd restart" - But sorry, no success, no connection to the Win-7 machine.
    Would you please tell me, what you have set up as "net usershare definition"? Or did you never setup such definition?

     

    Last edit: Clemens M. Hürten 2018-06-05
  • Gary Marks

    Gary Marks - 2018-06-05

    Clemens, whenever you show us how you attempt to connect to the network share, your path only includes a single "\" before the computer name or IP address. Is this simply an error you're making here in the forum, or is this an accurate reflection of the commands you're using on your machine? You should be using the double backslash at the start, as in "\\192.168.178.36\Test-ext4" (re-examine Adrian's last reply).

    Edit: Nevermind, I just now saw how the forum display is different from what you actually type in. It changed my own double-backslash to a single, and so I had to edit the above and type 4 backslashes in order for the forum to display a double-backslash. So that's why your command looked wrong to me. Sorry.

     

    Last edit: Gary Marks 2018-06-05
  • Clemens M. Hürten

    Hi Adrian!
    I have got it!!! Reading again your first answer, I assume, that you did not deal with terminal and "net usershare add....", because your Linux Mint contains filemanager Nemo and you have set up the shared folder via Nemo.
    Ckecking, why my additional installed Nautilus filemanager did not have Share Options in its menu, I found out, that the component "nautilus-share" had not been installed. I could install it via Synaptics packetmanager.
    Then I removed the shares, which I could see as text files in /var/lib/samba/usershares/
    In the next step, I defined the share folder within Veracrypt container via Nautilus and the share options.
    After this step, I could access the folder within VeraCrypt container without any problem! And of course, with the path, you have told me: '\192.168.178.36\Test-ext4'

    Thank you very much for your advice and your patience!

    I wonder, what would be the difference between defining a shared folder via Nautilus / Nemo or doing this by "net usershare add..." and connecting the folder to the group sambashare.

    Wow, I am happy now!

     

    Last edit: Clemens M. Hürten 2018-06-05
  • Clemens M. Hürten

    @ Gary: It is by forum software, which suppresses the leading backslash. If I put apostroph before, then both backslashes remain in the posting.

    @all:
    One difference between my manually defined net usershare and that definition, which is generated via Nautilus filemanager is the group! I had defined the group "sambashare", following the advice in the wiki.ubuntuusers.de. Nautilus defines the group of the shared folder as "nobody".
    But this is not the real reason, why I now can connect via network, because there are some other folders from earlier trying, which were still "sambashare".
    Since installation of the Nautilus component "nautilus-share" all thes shared folders do show up in Windows filemanager as subfolders of the MSI-Computer [computername] , which shows up beyond "network". There is no IP-adress required. As soon as I mount the Veracrypt container, the shared folders in it show up.

    OK, everyone, who is familiar with setting up network devices, would smile about my story here. And those, who are not familiar, can take it as a helpful hint.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.