how to change user home directory location?

Ask all your questions regarding OC 4.x and older. Please read the Support Forum Rules
Forum rules
Before you post; make sure you are using at least PHP Version 5.3.x - Also read How To Solve Problems By Yourself

how to change user home directory location?

Postby wangd » Fri May 04, 2012 4:52 pm

Passed Tests (7)
  • PHP Version:5.3.11
  • Server Software:(IIS) Microsoft-IIS/7.5
  • php.ini:upload_max_filesize:2M
  • php.ini:post_max_size:8M
  • php.ini:memory_limit:128M
  • File upload limit:Upload files up to 2 MB
  • Config (Writeable):Config is writeable
Possible Problems (1)
  • File Upload:Please check your settings (see warning below)
No Critical Issues.

I've been testing owncloud as a way to allow school staff and students to easily upload content created on tablets to their Windows fileserver home directory.

I've gotten a proof of concept working but with one issue that I'm curious if anyone can help with. The issue is the hard coded "/files" directory that owncloud uses for the 'root' of a user's home directory. I recognize that the reason for doing it this way is to make sure that add-on data (like the gallery/pictures thumbnail cache) would not be viewed or seen by the end-user. That said, I'd still like to find out if we can remove the "/files" hard coding and allow owncloud to use the directory above as the 'root' of a user's home directory.

For example, a user access their files at the level of /var/www/owncloud/data/jsmith/files right now. I'd like to modify the code to have it be accessible at /var/www/owncloud/data/jsmith

I've already did a search for all lines that have '/files' or just 'files' (that pertains to user path and not the files path used for owncloud functions) in the owncloud php code and removed them including some modification of conditional if statement code. I've gotten it to show the Windows home directory correctly. However after the display the list of files, it just hangs. So obviously it is doable but it looks like some other areas are being missed.

sidenote: I'm curious also why the 'files' path is hard coded the way it is and is not a variable like the /data directory. I really think this would be a benefit to choose what the /files directory location or even be able to change it to a different name if it was not hard coded.


As for how I'm tying in owncloud to a Windows user fileserver. Here's some quick notes:
- I've created a Windows Server 2008 R2 server joined to our domain.
- Installed IIS as noted in the installation guide. I've installed owncloud as instructed in the guide.
- I created a directory symbolic link using mklink to point the /data directory to our network user fileserver
- I created a generic domain user account that is used to 1] run the IIS webserver and owncloud and 2] applied to the user's home directory with RW permission.

With this set up, a user can then use owncloud to upload directly to their home directory and then use their Windows/Mac workstation to edit the content further.

If anyone can help with figuring out how to remove the /files directory hardcoding or have another idea to unify a user's experience to get to their home directory whether on a Windows/Mac machine or owncloud that would much appreciated.

Thanks much!
Posts: 1
Joined: Fri May 04, 2012 3:45 pm

Re: how to change user home directory location?

Postby cloudyday » Mon Oct 01, 2012 6:14 pm

Did you ever figure this out? I would like to do the same thing as you.
Posts: 5
Joined: Mon Oct 01, 2012 5:30 pm

Re: how to change user home directory location?

Postby fhorisberger » Wed Jan 09, 2013 9:12 pm

Did you ever figure this out? I would like to do the same thing as you.

thank you...
Posts: 2
Joined: Thu Jun 07, 2012 10:02 pm

Re: how to change user home directory location?

Postby RandolphCarter » Thu Jan 10, 2013 8:32 am

To use the directory above the files directory as root directory which the user sees in owncloud is definitely a very bad idea if you ask me: Some apps create folders there which you don't want the user to see - they shouldn't be able to meddle with the raw versions directory for example; and it is walked for images, and thumbnails of all images there are created - so that already would create an endless loop with the thumbnails I could imagine, since of all thumbnails, again thumbnails need to be created, and so on...).

Just changing the files directory can work, however, I guess. It might work with custom mounts.

In case you're on linux, this would definitely be possible using maybe symbolic links or using bind mounts.

Have you tried any of these yet?
Posts: 3302
Joined: Wed May 30, 2012 7:42 am
ownCloud version: 6.0.2
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.5.x

Re: how to change user home directory location?

Postby Sphinx » Thu Jan 10, 2013 5:14 pm

Seconded, horrible idea.
Posts: 342
Joined: Mon Nov 26, 2012 7:45 pm
Location: Silicon Valley
ownCloud version: 5.0.14a
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4

Return to ownCloud Community Edition 4.x and older

Who is online

Users browsing this forum: Google [Bot] and 12 guests