LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-20-2015, 07:36 AM   #1
aristosv
Member
 
Registered: Dec 2014
Posts: 263

Rep: Reputation: 3
eCryptfs Input/output error


I used this guide to encrypt a folder on my Linux machine.

Everything seems to be working OK, because when the folder is mounted using eCryptfs, I can read the contents of the files just fine. When I unmount, I cannot read the contents since its encrypted.

I have also added an entry in /etc/fstab as per the guide, so that the folder is automatically mounted on boot. And it seems to be working also, because when I run the command "mount", my encrypted folder appears in the list of mounted items.

My problem is that after rebooting, whenever I try to read a file using "cat logfile.log" I get a message saying "logfile.log: Input/output error"

The other strange thing is that while I am experiencing the problem above, if I umount the folder, I can read the files again without any issues. Which is wrong, since they are supposed to be encrypted.

Anyone has any clue what I might be doing wrong?

This is quick list of the commands I run:

Code:
apt-get install -y ecryptfs-utils
modprobe ecryptfs
mkdir ~/secret
chmod 700 ~/secret
mount -t ecryptfs ~/secret ~/secret

nano /root/.ecryptfsrc
key=passphrase:passphrase_passwd_file=/root/.ecryptfs/creds.txt
ecryptfs_sig=encryption_sig_here
ecryptfs_cipher=aes
ecryptfs_key_bytes=16
ecryptfs_passthrough=n
ecryptfs_enable_filename_crypto=n

nano /root/.ecryptfs/creds.txt
passphrase_passwd=password_goes_here

nano /etc/fstab
/root/secret /root/secret ecryptfs defaults 0 0
 
Old 02-26-2015, 12:25 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I think you need to explain better what is happening when you try to cat a file and get input/output error. Is that file in a non-encrypted folder, or encrypted folder? If you ls -l that file what information does it show, is it a file, a symbolic link, or something else?

On the umount and then still be able to see your encrypted files, I have experienced that. I think even to the point of logging off and logging back on as the same user I've been able to access an encrypted directory. My suspicion is that you have to stop the decryption of it somehow. My other notice is that if you do reboot or shutdown this obviously does take care of the problem.

When I return home I'll experiment and see if I can figure a way to shut down the viewing of an encrypted volume entirely without going so far as a reboot, there has to be a way, and I've been complacent at not looking into that myself. I'll send and update if I figure it out.
 
  


Reply



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
Error fsyncing/closing/dev/sda: Input/output error Petalocsta Linux - Laptop and Netbook 2 11-07-2011 05:40 PM
[ECRYPTFS] ecryptfs_init_miscdev: Error whilst attempting to open [/dev/ecryptfs] nitinarora Linux - Kernel 0 03-22-2010 05:36 AM
aplay: pcm_write:1029: write error: Input/output error mimithebrain Linux - Software 2 12-04-2007 11:51 AM
RPM iinstallation [error: failed to stat /mnt/windows: Input/output error] Ameii83 Linux - Software 1 04-09-2007 07:05 AM
cp - error reading /mnt/cdrom/mpegav/avseq01.dat input/output error manishsingh4u Linux - General 2 10-17-2005 05:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

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