Help all I want to do is change the data directory.

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

Help all I want to do is change the data directory.

Postby delboy83uk » Thu Mar 29, 2012 7:05 pm

I have owncloud working on my Arch server but with one major snag.

The main issue i have is setting a different data directory to the default one. My Arch root partition is only 5gb and owncloud sets the default data directory in /srv/http/owncloud, this means currently I only have 1.2gb free for owncloud.

On the initial setup if i change the data directory to anything in my home folder, (stored on a separate partition with all the space) I get an error saying that owncloud couldn't create the folder. If i try and create a symlink from /srv/http/owncloud to my home folder I again get all sorts of permission issues. I've changed all the users and permissions to what apparently would be correct but to absolutely no avail.

The owncloud website only suggests editing the config.ini but in my case this inst at all useful.

I'd love to get this working properly and remove my need for dropbox and google.

Thanks in advance

Craig

EDIT: Whats with all the spam in this forum! Where are the mods with the ban hammer?
delboy83uk
Newbie
 
Posts: 1
Joined: Thu Mar 29, 2012 6:46 pm

Re: Help all I want to do is change the data directory.

Postby wileycoyote76 » Sat Mar 31, 2012 3:37 am

I am also looking for the same thing. I would love to use my existing file structure on my windows 2008 server as the drive that houses the wwwroot folder is very limited.

any help would be greatly appreciated.
wileycoyote76
Beginner
 
Posts: 17
Joined: Sat Mar 31, 2012 3:34 am

Re: Help all I want to do is change the data directory.

Postby wileycoyote76 » Sat Mar 31, 2012 3:52 am

Ok, I figured out how to use my existing file structure (kind of). There is a config.php file in the following location
C:\inetpub\wwwroot\owncloud\config

In that file there is a data path entry, all I did is changed it to my secondary drive. I did have to restructure a little bit by putting everything within my user\data folder but I can live with that.

Obviously this may not be the same for you with another type of server but it may help in the right direction.
wileycoyote76
Beginner
 
Posts: 17
Joined: Sat Mar 31, 2012 3:34 am

Re: Help all I want to do is change the data directory.

Postby aleandro » Fri Apr 06, 2012 1:50 pm

good hints. thx
aleandro
Beginner
 
Posts: 15
Joined: Fri Apr 06, 2012 12:59 pm

Re: Help all I want to do is change the data directory.

Postby drhirn » Wed May 02, 2012 12:05 pm

Hi,

and how has directory security to be configured when using Windows Server? I always get the following message when changing the path to C:\temp\owncloud:

Can't create data directory (C:\temp\owncloud)

You can usually fix this by giving the webserver write access to the ownCloud directory 'C:/inetpub/wwwroot/owncloud'


(note the two different directories in the error message)

Actually everyone has full access to the directory.

Thx
Stefan
drhirn
Starter
 
Posts: 92
Joined: Wed Apr 25, 2012 11:50 am

Re: Help all I want to do is change the data directory.

Postby drhirn » Wed May 02, 2012 3:32 pm

Hi again,

seems, it had to do something with php.ini but I can't remember, what exactly I've changed to get it working. I'll post my settings here, maybe it'll help someone else. The "open_basedir" is important, comment this out.

So, this is my php.ini on a Windows Server 2008R2 Server. Also working with IIS on Windows 7. Everything, which is missing, hasn't changed compared to the original php.ini-production.
Code: Select all
[PHP]
;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;

;open_basedir =

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 300
memory_limit = 1G

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;

post_max_size = 0

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

;include_path = ".;c:\php\includes"
;doc_root =
user_dir =
extension_dir = "c:\php\ext"
enable_dl = Off
cgi.force_redirect = 0
cgi.fix_pathinfo=1
fastcgi.impersonate = 1
fastcgi.logging = 0

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

file_uploads = On
upload_tmp_dir = "D:\Temp"
upload_max_filesize = 1G
max_file_uploads = 20

;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

extension=php_curl.dll
extension=php_gd2.dll
extension=php_intl.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll


IMPORTANT: You don't have to change anything related to NTFS directory security within your web root directory (e.g. c:\inetpub\wwwroot). But you have to give IUSR read/write access to your data directory (or the user your application pool is runing under).

Bye
Stefan
drhirn
Starter
 
Posts: 92
Joined: Wed Apr 25, 2012 11:50 am

Re: Help all I want to do is change the data directory.

Postby SteveRiley » Sun May 06, 2012 6:08 am

An alternative is to use symbolic links, which I just did today.

My OwnCloud server runs on a Ubuntu server instance on Amazon Web Services. I'm using a t1.micro, which supplies 8 GiB disk for /. The free tier allows up to 30 GiB. So I created a disk volume (using the AWS Elastic Block Storage), attached it to my instance, created a single partition, and formatted it as ext4. Then I:

* created the directory /mycloud
* mounted my new volume to /mycloud (and added a line to /etc/fstab)
* stopped Apache
* moved /var/www/owncloud/data to /mycloud/data
* created the data symlink in /var/www/owncloud to /mycloud/data
* moved /var/www/owncloud/config to /mycloud/config
* created the config symlink in /var/www/owncloud to /mycloud/config
* changed owner of both symlinks to www-data:www-data
* restarted Apache

This worked perfectly and required no changes to any configuration files.
Last edited by SteveRiley on Tue May 08, 2012 7:48 am, edited 1 time in total.
User avatar
SteveRiley
Beginner
 
Posts: 22
Joined: Sun May 06, 2012 5:18 am
Location: Seattle, WA, USA

Re: Help all I want to do is change the data directory.

Postby regder » Tue May 08, 2012 7:13 am

I'm trying to do the same as above, create a symlink to another drive.

I've followed the steps outlined by SteveRiley and am getting the "Can't create data directory (/srv/http/owncloud/data)" when trying to open my owncloud page.

This is what my symlinks look like under ls -l, am I doing something wrong?:

lrwxrwxrwx 1 http http 23 May 8 01:57 data -> /cloud/data/

Any other workarounds to get this to work?

Thanks
regder
Newbie
 
Posts: 3
Joined: Mon May 07, 2012 6:43 am

Re: Help all I want to do is change the data directory.

Postby SteveRiley » Tue May 08, 2012 7:47 am

Well, I just noticed that I mistyped a couple lines. Originally I typed:

* created the data symlink in /var/www/owncloud/data to /mycloud/data
* created the config symlink in /var/www/owncloud/config to /mycloud/config

when in fact these should be:

* created the data symlink in /var/www/owncloud to /mycloud/data
* created the config symlink in /var/www/owncloud to /mycloud/config

I will fix my earlier post.

Would you show us the entire output of
Code: Select all
ls -al /srv/http/owncloud
User avatar
SteveRiley
Beginner
 
Posts: 22
Joined: Sun May 06, 2012 5:18 am
Location: Seattle, WA, USA

Re: Help all I want to do is change the data directory.

Postby kuyote » Wed May 09, 2012 2:21 am

I'm having the same issue changing to and NFS mounted data directory. I've tried mounting directly to the data directory, as well as creating symlink to a mounted directory. I've su'd to the apache user and verified that I can write to the directory.
kuyote
Newbie
 
Posts: 3
Joined: Wed May 09, 2012 2:17 am

Next

Return to OwnCloud Community Edition 4.x and older

Who is online

Users browsing this forum: No registered users and 20 guests