Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-16-2010, 08:24 PM   #1
Registered: Apr 2009
Posts: 222

Rep: Reputation: 17
can't mount ecryptfs as user

Hi All,

I've setup an ecryptfs folder which I can easily mount/umount as su.

Inspite of adding a `user' option in fstab I'm unable to mount the folder as normal user:
mount secret

Error attempting to evaluate mount options: [-22] Invalid argument
Check your system logs for details on why this happened.
Try updating your ecryptfs-utils package, and/or
submit a bug report on
and in /var/log/syslog:
Dec 17 10:20:50 mike mount.ecryptfs: Could not open library handle
Dec 17 10:20:51 mike mount.ecryptfs: do_hash: PK11_HashBuf() error; SECFailure = [-1]; PORT_GetError() = [-8128]
Dec 17 10:20:51 mike mount.ecryptfs: Error generating passphrase signature; rc = [-22]
Dec 17 10:20:51 mike mount.ecryptfs: ecryptfs_add_passphrase_key_to_keyring: Error attempting to generate the passphrase auth tok payload; rc = [-22]
Any ideas?.

Old 12-17-2010, 09:22 AM   #2
Registered: May 2009
Location: Chelmsford, England
Distribution: OpenSuse 12.2 and 13.2, Leap 4.2
Posts: 120

Rep: Reputation: 24
I think you need to use setuid in a script: see here for details on setuid;

I use Luks rather than encyptfs but it may give you a hint. I have a compiled C program (say openup) where openup.c looks like this:

int main()
setuid( 0 );
system( "/bin/bash -c /home/.../" );

return 0;

where is the bash script to open the encrypted folder

Here openup is owned by root with setuid set (was compiled as root, I think); group and others have the exec set.

There may be safer or less clumsy ways of doing it, but that works on OpenSuse.

Last edited by Peverel; 12-17-2010 at 12:37 PM. Reason: Wrong encrypting!
Old 12-20-2010, 12:59 AM   #3
Registered: Apr 2009
Posts: 222

Original Poster
Rep: Reputation: 17
Thanks for replying. I'm not sure it's a setuid issue. If it does then I won't do that anyway since IIRC this entails security issues.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
eCryptfs idlehands Linux - Security 3 10-04-2010 04:22 AM
[SOLVED] eCryptfs/ext4/Ubuntu 10.04 riganta Linux - Laptop and Netbook 3 05-20-2010 11:57 AM
[ECRYPTFS] ecryptfs_init_miscdev: Error whilst attempting to open [/dev/ecryptfs] nitinarora Linux - Kernel 0 03-22-2010 06:36 AM
Use ecryptfs for FTP login security? epolanco Linux - Security 4 08-27-2009 03:53 PM
ecryptfs installation problem nkd Linux - Security 3 10-02-2007 04:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration