<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>mount hardware-encrypted container</title>
		<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container</link>
		<description>Posts in the discussion thread &quot;mount hardware-encrypted container&quot;</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-286608</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-286608</link>
				<description></description>
				<pubDate>Sun, 19 Oct 2008 12:39:45 +0000</pubDate>
				<wikidot:authorName>Rippchen</wikidot:authorName>				<wikidot:authorUserId>221174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Thanks, now it works great.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-286281</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-286281</link>
				<description></description>
				<pubDate>Sat, 18 Oct 2008 21:01:10 +0000</pubDate>
				<wikidot:authorName>edhut</wikidot:authorName>				<wikidot:authorUserId>153253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>If I compare your file listing with my own, I see that the ownership of the vault.fs file is different. You have to manually set the ownership to root. The command for this is:</p> <div class="code"> <pre> <code>chown root:root vault.fs</code> </pre></div> <p>Hope this helps.</p> <p>Cheers,<br /> Ed</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-283402</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-283402</link>
				<description></description>
				<pubDate>Tue, 14 Oct 2008 16:01:06 +0000</pubDate>
				<wikidot:authorName>Rippchen</wikidot:authorName>				<wikidot:authorUserId>221174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>i have the same problem. When I mount /dev/mapper/vault at the mountpoint and start the command ls-l I get this.<br /> drwsrwsr-x 4 www-data www-data 4096 Oct 11&nbsp;10:52 PUBLIC<br /> drwsrwsr-x 11 www-data www-data 4096 Oct 11&nbsp;14:20 <strong>*</strong>*<br /> drwsrwsr-x 3 root root 1024 Oct 11&nbsp;14:23 VAULT<br /> drwsrwsr-x 2 www-data www-data 16384 Apr 10 2008 lost+found<br /> -rw-r<span style="text-decoration: line-through;">r</span> 1 www-data www-data 1000000000 Oct 11&nbsp;10:34 vault.fs<br /> I think that there is something wrong. So please help me. I used the command chmod 6775 on the folder but it doesnt work.</p> <p>Rippchen</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-228536</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-228536</link>
				<description></description>
				<pubDate>Sun, 27 Jul 2008 20:12:02 +0000</pubDate>
				<wikidot:authorName>edhut</wikidot:authorName>				<wikidot:authorUserId>153253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>And now it works!</p> <p>I had to set the permissions of VAULT manually and include the SETGID explicitly. Using the webinterface of the MyBookWorld didn't do this. Don't know why it didn't do it, but I do know that my MyBookWorld is a rather early one.</p> <p>Thank you very much for you help Andy.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-227211</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-227211</link>
				<description></description>
				<pubDate>Fri, 25 Jul 2008 10:50:43 +0000</pubDate>
				<wikidot:authorName>andyy</wikidot:authorName>				<wikidot:authorUserId>148850</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ed</p> <p>I can write to, read from, modify files from Windows. Note that my /shares/internal/vault.fs file and VAULT directory has the following attributes:</p> <p>-rw-r<span style="text-decoration: line-through;">r</span> 1 www-data www-data 8000000000 Jun 16&nbsp;01:27 vault.fs<br /> and<br /> drwxrws—- 4 www-data www-data 4096 Jul 25&nbsp;20:39 VAULT</p> <p>Check that your files have similar ownership and attributes.</p> <p>Andy</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-226116</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-226116</link>
				<description></description>
				<pubDate>Wed, 23 Jul 2008 19:49:14 +0000</pubDate>
				<wikidot:authorName>edhut</wikidot:authorName>				<wikidot:authorUserId>153253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Andy,</p> <p>Accessing it via Windows is exactly the plan, but unfortunately it still gives the same error after I'd started from scratch again.</p> <p>However, your explicit mentioning of Windows gave me the idea to try to copy a file on the MyBookWorld itself into the vault. And that works fine and from a Windows client I can see the copied file. I cannot rename it or delete it, but I can read it. Isn't this as simple as setting the access bits of the vault itself (on top of the access right that are granted via the Webinterface of the MyBook)?</p> <p>What I don't understand is your remark about the SETGID bit. I looked it up, but as a Unix nood I could do much with what I found. Maybe that's something I have to do explicitly.</p> <p>Sorry if I tire you with this noob-Q's :-)</p> <p>Ed</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-216908</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-216908</link>
				<description></description>
				<pubDate>Wed, 09 Jul 2008 11:17:08 +0000</pubDate>
				<wikidot:authorName>andyy</wikidot:authorName>				<wikidot:authorUserId>148850</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Ed</p> <p>Haven't been to this site for a while.</p> <p>You probably left out some steps such as (Assuming you want to share this with Windows users):</p> <p>Using MyBook's web interface, create a new folder call VAULT and assign access rights to users to access it.<br /> This is the same procedure that you use to share folders to Windows users. If you create this directory using the web interface, it will set the permission correctly (including the SETGID bit). Once you mounted the device:<br /> mount /dev/mapper/vault /shares/internal/VAULT<br /> You should be able to read/write from Windows clients.</p> <p>Is that what you are trying to do?</p> <p>Andy</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-209228</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-209228</link>
				<description></description>
				<pubDate>Fri, 27 Jun 2008 20:53:55 +0000</pubDate>
				<wikidot:authorName>edhut</wikidot:authorName>				<wikidot:authorUserId>153253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi there. Well, I'm close, but not quite there yet. The vault is visible, but I cannot create files in it. I get a write permission when I try it. In the web-interface of the MyBookWorld the VAULT has full access for everyone and I've also tried to chmod the vault.fs file itself to give it RW permissions for all users, but without any luck. Below is a copy/paste of the vault.fs file.<br /> -rwxrwxrwx 1 root root 8000000000 Jun 27&nbsp;20:22 vault.fs</p> <p>Hope this is an easy nut to crack :-)</p> <p>Ed</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-206785</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-206785</link>
				<description></description>
				<pubDate>Tue, 24 Jun 2008 21:31:56 +0000</pubDate>
				<wikidot:authorName>edhut</wikidot:authorName>				<wikidot:authorUserId>153253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi Andy,</p> <p>Haven't tried it yet, but thanks in advance for your reply. I think I should be able to get it working now.</p> <p>Cheers,<br /> Ed</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-206402</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-206402</link>
				<description></description>
				<pubDate>Tue, 24 Jun 2008 10:43:04 +0000</pubDate>
				<wikidot:authorName>andyy</wikidot:authorName>				<wikidot:authorUserId>148850</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Do the following:</p> <p>dd if=/dev/zero of=/shares/internal/vault.fs bs=1MB count=8000</p> <p>This command creates an 8GByte file for the container. This takes under 5 minutes. You could use /dev/urandom instead of /dev/zero, but using /dev/uramdom will take around 1 hour per GBytes</p> <p>Using MyBook's web interface, create a new folder call VAULT and assign access rights to users to access it.</p> <p>Then create a shell script in /etc/init.d/valut.sh</p> <div class="code"> <pre> <code>#!/bin/sh # # vault - to start or stop encrypted container # DEV=/dev/loop0 DMDEVNAME=vault DMDEV=/dev/mapper/$DMDEVNAME FILE=/shares/internal/vault.fs start() { if [ `df | grep $DMDEVNAME | wc -l` -eq 0 ]@@ then read key1 read key2 losetup $DEV $FILE echo 0 `ls -s $FILE | awk '{ print $1; }' ` ox-crypt $key1 $key2 0 $DEV 0 |/usr/sbin/dmsetup create $DMDEVNAME #mount $DMDEV /shares/internal/VAULT fi } stop() { if [ `df | grep $DMDEVNAME | wc -l` -ne 0 ] then umount $DMDEV /usr/sbin/dmsetup remove $DMDEV losetup -d $DEV fi } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $?</code> </pre></div> <br /> chmod 755 /etc/init.d/vault.sh <p>Run the script: /etc/init.d/vault.sh start</p> <p>This will ask for 2&nbsp;32-digit keys from the command line (one line per key, no prompt)</p> <p>After this, execut the command:<br /> mkfs.ext3 -m 1 /dev/mapper/vault<br /> mount /dev/mapper/vault /shares/internal/VAULT</p> <p>This will mount the encrypted container and you can access it from Windows as a shared drive.</p> <p>Edit the valut.sh you created and uncomment the line<br /> #mount $DMDEV /shares/internal/VAULT</p> <p>ie, remove the #</p> <p>Before you shutdown MyBook, execute<br /> /etc/init.d/vault.sh stop</p> <p>The every time you power on, run the command /etc/init.d/vault.sh start<br /> and enter the keys and shut down using /etc/init.d/vault.sh stop<br /> If you want to retrieve the keys automatically on boot, check out the original encrypted drive post.</p> <p>Note that if the encrypted file system is not mounted, you will see no files in the VAULT folder.</p> <p>Andy</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-205197</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-205197</link>
				<description></description>
				<pubDate>Sun, 22 Jun 2008 18:28:46 +0000</pubDate>
				<wikidot:authorName>edhut</wikidot:authorName>				<wikidot:authorUserId>153253</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>I've just started to hack my MyBookWorld and I would also like to encrypt just a part of the data on it (because of the performance hit if all data on the drive is encrypted).<br /> As a relative Unix noob, I would like to see the steps you took described in more detail.</p> <p>Thanks in advance.</p> <p>/Ed</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-162942</guid>
				<title>Re: mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-162942</link>
				<description></description>
				<pubDate>Tue, 13 May 2008 18:26:04 +0000</pubDate>
				<wikidot:authorName>martin_d</wikidot:authorName>				<wikidot:authorUserId>126996</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>To answer it myself: It is possible. You can use dd and losetup to set up the container, the rest works as described in the wiki.</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://mybookworld.wikidot.com/forum/t-59387#post-162733</guid>
				<title>mount hardware-encrypted container</title>
				<link>http://mybookworld.wikidot.com/forum/t-59387/mount-hardware-encrypted-container#post-162733</link>
				<description></description>
				<pubDate>Tue, 13 May 2008 12:35:49 +0000</pubDate>
				<wikidot:authorName>martin_d</wikidot:authorName>				<wikidot:authorUserId>126996</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi folks,</p> <p>I do not want to encrypt the whole filesystem, thus is there a way to mount a hardware-encrypted container (file) as for example /shares/encrypted?</p> <p>- Martin</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>