To store attachments on a windows shared network drive using the VM version of MindTouch:
Open a console and log in as root.
Install smbfs since smbmount isn't available default:
apt-get install smbfs
Before we can mount the network share, we first need to determine the uid and gid MindTouch is running under:
ps aux
Also, check in the output under which name the process /usr/bin/mono runs
If you run the following command, column 1 is the username, 2 is the password, 3 is the UID, and 4 is the GID.:
cat /etc/passwd | grep www-data
Now that you have this information, you can make the mount command.
You can update an existing startupscript (nano /etc/rc5.d/S20samba , right before the "exit" line) so everytime MindTouch starts up it automatically mounts the windows-share. Example:
echo mounting attachments drive mount -t smbfs -o username=name,password=pass,workgroup=mydomain,rw,uid=33,gid=33 //server/share /var/www/dekiwiki/attachments
You should use the workgroup switch only if you are on a domain.
Finally, it is necessary to configure MindTouch to go one level deeper on its attachments share (since somehow it invokes commands to the root directory that are incompatible with the windows share). Login as an admin onto your MindTouch site, go to the control panel, click on "configuration" and edit the key "storage/fs/path". This key defaults to "/var/www/dekiwiki/attachments" and you should only put it one level deeper like: "/var/www/dekiwiki/attachments/leveldeeper".
Some considerations:
With an initial install of the VM version of MindTouch, the "/var/www/dekiwiki/attachments" folder doesn't even exist . It gets made the first time you upload an attachment. So the mount command will not work if you do not upload an attachment first and delete it again. (delete it to get it out of the database, otherwise if you invoke the mount command later the attachment will be under the mounted folder and thus unavailable untill you unmount the windows share again. If you try to open the attachment you will get an error message.)
If you allready have a running MindTouch installation and lots of attachments, it might be best to first create another folder to put your attachments in ( eg /attachments) , chmod it 777 and mount the windows share on this folder. Now in this folder create the one level deeper folder and copy all attachments to it. If the copying is done point the configuration key "storage/fs/path" in your MindTouch site to "/attachments/leveldeeper" and all should work.
Follow the instructions above but install the following package:
yum install samba
and to turn Samba on so you can automatically mount the share, run the following:
chkconfig --levels 3 smb on chkconfig --levels 06 smb off
then edit the start script by going to /etc/rc3.d/ and opening S91smb for editing. Add the following line before the "exit" line:
echo mounting attachments drive mount -t smbfs -o username=name,password=pass,workgroup=mydomain,rw,uid=33,gid=33 //server/share /var/www/dekiwiki/attachments
Follow the instructions for the Debian/Ubuntu setup but use YaST to install the package "samba" and its dependencies.
Turn Samba on automatically with the following commands:
chkconfig --levels 3 smb on chkconfig --levels 06 smb off
then edit the start script by going to /etc/rc3.d/ and opening S91smb for editing. Add the following line before the "exit" line:
echo mounting attachments drive mount -t smbfs -o username=name,password=pass,workgroup=mydomain,rw,uid=33,gid=33 //server/share /srv/www/dekiwiki/attachments
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by
i need to access deki attachments in windows computer.
so, i have two questions.
first, what means leveldeeper??? i don't understand that.
second, i wonder bellow command what means.
mount -t smbfs -o username=name,password=pass,workgroup=mydomain,rw,uid=33,gid=33 //server/share /var/www/dekiwiki/attachments
'username, password' is what??? (is it values when i type 'ps aux' in ubuntuserver???)
'//server/share' is my window server ip/sharefolder?? or ubuntu server ip/sharefolder??
I need to anyones help.. edited 18:44, 7 Apr 2010