Menu

Confusing help message

b2f9h203
2015-06-23
2015-06-25
  • b2f9h203

    b2f9h203 - 2015-06-23

    I'm not sure, if it is an acutal bug or just me being too dumb to follow instructions, but this drove me crazy:

    veracrypt --version
    VeraCrypt 1.0f-2
    
    veracrypt [OPTIONS] VOLUME_PATH [MOUNT_DIRECTORY]
    [...]
    veracrypt --help
    [...]
    Examples:
    [...]
    Mount a volume:
    veracrypt volume.hc /media/veracrypt1
    
    Mount a volume as read-only, using keyfiles:
    veracrypt -m ro -k keyfile1,keyfile2 volume.tc
    [...]
    

    For me the Volume path is the path to my container volume and the mount directory the directory where the container will be mounted. Also there is the example explicitely stating this.

    So of course I tried:

    sudo veracrypt -tc mycontainer.tc /media/veracrypt1
    
    Enter mount directory [default]: 
    Enter password for /media/veracrypt1: 
    Enter keyfile [none]: 
    Protect hidden volume (if any)? (y=Yes/n=No) [No]: 
    Error: No such file or directory:
    /media/veracrypt1
    
    VeraCrypt::File::Open:228
    

    Ok, so I thought, that maybe mountpoint and containerpath are just in the wrong order in the documentation, because it asks me for a password for /media/veracrpyt1 instead for mycontainer.tc. So I tried:

    sudo veracrypt -tc ~/mountpoint/ mycontainer.tc
    Enter mount directory [default]:  
    Enter password for mycontainer.tc: 
    Enter keyfile [none]: 
    Protect hidden volume (if any)? (y=Yes/n=No) [No]: 
    ls ~/mountpoint/
    
    sudo bin/veracrypt -tc ~/mountpoint/ mycontainer.tc
    The volume "mycontainer.tc" is already mounted.
    

    As can be seen, it seems to be mounted, but no files appear in the mountpoint (there are files in the volume).

    So there are two possible bugs in the help message and maybe one bad design choice in the command line evaluation:

    1. Documentation scrambles up order of mount point and container-path. (Actually the order is correct, but only if the --mount option is explicitely given, unlike the example in the help-message) !
    
    2. If no --mount is given, then the container is mounted, but no files are listed (even with ls -la). [EDIT: Found the problem. The mount directory won't be used, but instead the default mount point (/mnt/veracrypt1 instead of my user-choice /mnt/VeraCrypt1 or another user choice I tried: ~/mountpoint) is being used. I guess this is to be expected when pressing enter for the question for the "mount directory [default]", but this doesn't happen, when using --mount-option. And why does it ask for the mount-directory anyway, if I have specified it on the command line?!
    

    Here another bash log, showing the difference between with and without --mount-option:

    sudo bin/veracrypt -tc --mount mycontainer.tc mountpoint
    Enter password for mycontainer.tc: ^C
    ^C
    sudo bin/veracrypt -tc mycontainer.tc mountpoint
    Enter mount directory [default]: 
    Enter password for /tmp/usr/mountpoint:
    
     
  • Anonymous

    Anonymous - 2015-06-25

    Thank your for the fast response :)
    This solves both the mentioned problems. This is a cool case for: one simple error is more likely than two difficult errors.

    /tmp/usr/bin/veracrypt --version
    VeraCrypt 1.12-BETA
    /tmp/usr/bin/veracrypt -tc container.tc mountpoint
    Enter password for container.tc: 
    Enter PIM for container.tc: 
    Enter keyfile [none]: 
    Protect hidden volume (if any)? (y=Yes/n=No) [No]: 
    Enter your user password or administrator password:
    ls ./mountpoint
    [my folders showing :)]
    
     
  • b2f9h203

    b2f9h203 - 2015-06-25

    Forgot to log in. I am the anonymous poster. In short: it works now, thank you :)

     
  • Mounir IDRASSI

    Mounir IDRASSI - 2015-06-25

    Thank for the update!

     

Log in to post a comment.