Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7496843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:49:01+00:00 2026-05-29T18:49:01+00:00

I would like to mount a trucrypt volume using PHP, but I’m getting the

  • 0

I would like to mount a trucrypt volume using PHP, but I’m getting the following return value from the exec command: Enter keyfile [none]:

This is how i tried:
First try:

truecrypt -p password --fs-options=users,uid=$(id -u mysql),gid=$(id -g mysql),fmask=0113,dmask=0002 --mount /media/vulturus_data/test2 /media/true/

Second try:

truecrypt --fs-options=users,uid=$(id -u mysql),gid=$(id -g mysql),fmask=0113,dmask=0002 --mount /media/vulturus_data/test2 /media/true/ << EOF password EOF 

If I’m executing in command line this command, then it is working without any problem.

I also included the following line %www-data ALL=(root) NOPASSWD:/usr/bin/truecrypt
in to /etc/sudoers

UPDATED


This is my environmental variables:

ORBIT_SOCKETDIR=/tmp/orbit-robu
SSH_AGENT_PID=13131
TERM=xterm
SHELL=/bin/bash
XDG_SESSION_COOKIE=c1bdff7bae779799d48380cc4dede420-1328690954.481942-1775992192
WINDOWID=69206021
GNOME_KEYRING_CONTROL=/tmp/keyring-MHRREA
GTK_MODULES=canberra-gtk-module
USER=robu
LS_COLORS=rs=0:di=01;34:ln=01;36:hl=44;37:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
SSH_AUTH_SOCK=/tmp/keyring-MHRREA/ssh
DEFAULTS_PATH=/usr/share/gconf/gnome.default.path
S    ESSION_MANAGER=local/vulturus:@/tmp/.ICE-unix/13094,unix/vulturus:/tmp/.ICE-unix/13094
USERNAME=robu
XDG_CONFIG_DIRS=/etc/xdg/xdg-gnome:/etc/xdg
DESKTOP_SESSION=gnome
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
PWD=/home/robu
GDM_KEYBOARD_LAYOUT=us
LANG=en_US.utf8
GNOME_KEYRING_PID=13076
MANDATORY_PATH=/usr/share/gconf/gnome.mandatory.path
GDM_LANG=en_US.utf8
GDMSESSION=gnome
SPEECHD_PORT=7560
SHLVL=1
HOME=/home/robu
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
LOGNAME=robu
X    DG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-X2vS4Wtxb9,guid=be42629003d6f13a98884ed54f32370a
LESSOPEN=| /usr/bin/lesspipe %s
DISPLAY=:0.0
LESSCLOSE=/usr/bin/lesspipe %s %s
XAUTHORITY=/var/run/gdm/auth-for-robu-TBzbLF/database
COLORTERM=gnome-terminal
_=/usr/bin/env
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T18:49:02+00:00Added an answer on May 29, 2026 at 6:49 pm

    I added the –non-interactive option:

    $mount = 'sudo truecrypt  -p '.$pass['truecrypt_pass']." --slot=".(20+$data->id);
            if($data->is_ntfs == 0)
                $mount .= ' --filesystem=ntfs-3g ';
    
            if($data->is_ntfs == 1)
                $mount .= ' --fs-options="users,uid=$(id -u mysql),gid=$(id -g mysql),fmask=0027,dmask=0027"';
    
            if($data->key_file)
                $mount .= " -k ".$data->key_file;
            $mount .= ' --mount '.$data->volume_location.' '.$data->mount_point." --non-interactive " ;
    
            shell_exec($mount); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to Mount a Folder as a Letter using Windows XP. E.g.
I would like to mount a sinatra application in my rails app. But I
Would like to get a list of advantages and disadvantages of using Stored Procedures.
I would like to sort an array in ascending order using C/C++ . The
I would like to have a reference for the pros and cons of using
I would like to do something like this: chroot /mount-point /path/to/script $var1 $var 2
I would like to run a shell script, from a file or from an
I'm using a Mac at work and would like some network shares mounting when
I would like to install Rails 3.0 Beta but ran into what appears to
Would like to create a strong password in C++. Any suggestions? I assume it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.