Jump to content

Recommended Posts

Posted

I have created an OwnCloud server, successfully installed and configured with LDAP. I now wish to map current user directories into OwnCloud - has anybody managed to do this? The home directory shares are located on a separate server to that which OwnCloud is installed.

 

Thanks

Posted
I have created an OwnCloud server, successfully installed and configured with LDAP. I now wish to map current user directories into OwnCloud - has anybody managed to do this?

 

Yes. We have OwnCloud running on its own dedicated virtual machine with Debian 7.2 (Wheezy) installed, Samba installed and the Debian machine joined to the domain. Samba is set up so that people can SSH in to the Debian server with their Active Directory username and password if they wish - this thread provides details. I then have a Python script that runs (from /etc/rc.local) at boot time:

 

#!/usr/bin/python

import os

wbinfoHandle = os.popen("wbinfo -u")
wbinfoLines = wbinfoHandle.readlines()
wbinfoHandle.close()

for wbinfoLine in wbinfoLines:
       username = wbinfoLine.strip()
       homeFolder = "/home/DOMAINNAME/" + username
       if not os.path.exists(homeFolder):
               os.mkdir(homeFolder)
               os.mkdir(homeFolder + "/files")
               os.mkdir(homeFolder + "/thumbnails")
               os.system("chown -R www-data:www-data " + homeFolder)
       os.system("mount -t cifs -o uid=www-data,gid=www-data,username=administrator%PASSWORDGOESHERE //FILESSERVER/home/" + username + "/My\\ Documents " + homeFolder + "/files > /dev/null 2>&1")

  • Thanks 1
Posted
Thanks for this, but I have ownCloud installed on a Windows Server 2008R2 VM - is there a way to do this in Windows?

 

Sure, you can mount Windows shares as Windows folders in much the same way - Windows calls them NTFS Symbolic Links:

 

NTFS symbolic link - Wikipedia, the free encyclopedia

 

You just need to write a script that goes through each user's OwnCloud folder and mounts their home folder as an NTFS Symbolic Link.

  • Thanks 1
Posted

Ok, I have successfully created symbolic links, which is now called "files" within the username of the OwnCloud file structure. If I login to OwnCloud I now see nothing at all. If I create a file it will appear in the view, but then on refresh the file would disappear. I therefore believe this to be a permissions issue as local permissions on one server are not available on the server where the shares are hosted...if that makes sense.

 

Any advice on the best way around this? The symbolic link created works perfectly within Windows when logged onto the server as admin, taking me straight to the user share on the share server.

 

Thanks

Posted
I therefore believe this to be a permissions issue as local permissions on one server are not available on the server where the shares are hosted...if that makes sense.

 

Hmm - not tried this on a Windows server myself, can you mount each user file area, via an NTFS symbolic link, as a particular user? Your script would have to mount each file area as that particular user.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...