On 04/17/16 13:20, Joseph Oficre wrote:
> I want to store all my files centralized. I have some windows pc's at home,
> some notebooks and my work laptop. So i want to be able to put and take the
> files from any of this PC's. But /var/ partition only 100gb size, so i
> think it's good idea to move datadir to /home/ partition(or even to
> external large disk, that i can just put in my pocket)

You could set chroot voor httpd and php-fpm to /home/USER/owncloud.
This however would mean that both daemons are stuck within that directory.

Keep user-permissions in mind when doing this.

See httpd.conf(5) and /etc/php-fpm.conf.
> 
> 2016-04-17 14:12 GMT+03:00 Erling Westenvik <erling.westen...@gmail.com>:
> 
>> On Sun, Apr 17, 2016 at 12:40:59PM +0300, Joseph Oficre wrote:
>>> Hello misc.
>>> I've installed ownCloud with this guide
>>>
>> https://github.com/reyk/httpd/wiki/Running-ownCloud-with-httpd-on-OpenBSD
>>>
>>> Everything looks fine, but i want to store all my files not in
>>> /var/www/owncloud/data but in /home/USER/owncloud/data/
>>> Moving datadir to home and reconfiguring config/config.php
>> "datadirectory"
>>> did nothing, only error:
>>
>> httpd(8) is chroot(8)'ed to /var/www by default. Your options include:
>>
>> - disabling chroot, which isn't a very recommended option, or
>> - set up /home as the new chroot, which probably isn't a very recommended
>>   option either.
>>
>> What are you trying to achive?
>>
>> Regards,
>>
>> Erling
>>
>>>
>>> PHP message:
>>>
>> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"index","message":"Exception:
>>> {\"Exception\":\"Doctrine\\\\DBAL\\\\DBALException\",\"Message\":\"Failed
>>> to connect to the database: An exception occured in driver:
>> SQLSTATE[HY000]
>>> [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
>>> OC\\\\DB\\\\Connection->connect()\\n#1
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
>>> Doctrine\\\\DBAL\\\\Connection->executeUpdate('PRAGMA read_unc...',
>> Array,
>>> Array)\\n#2
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
>>> OC\\\\DB\\\\Connection->executeUpdate('PRAGMA read_unc...')\\n#3
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
>>> Doctrine\\\\DBAL\\\\Connection->setTransactionIsolation(2)\\n#4
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
>>> OC\\\\DB\\\\Connection->__cons...
>>> PHP message:
>>>
>> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
>>> {\"Exception\":\"Doctrine\\\\DBAL\\\\DBALException\",\"Message\":\"Failed
>>> to connect to the database: An exception occured in driver:
>> SQLSTATE[HY000]
>>> [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
>>> OC\\\\DB\\\\Connection->connect()\\n#1
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
>>> Doctrine\\\\DBAL\\\\Connection->executeUpdate('PRAGMA read_unc...',
>> Array,
>>> Array)\\n#2
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
>>> OC\\\\DB\\\\Connection->executeUpdate('PRAGMA read_unc...')\\n#3
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
>>> Doctrine\\\\DBAL\\\\Connection->setTransactionIsolation(2)\\n#4
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
>>> OC\\\\DB\\\\Connection->__const...
>>> PHP message:
>>>
>> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
>>> {\"Exception\":\"Doctrine\\\\DBAL\\\\DBALException\",\"Message\":\"Failed
>>> to connect to the database: An exception occured in driver:
>> SQLSTATE[HY000]
>>> [14] unable to open database file\",\"Code\":0,\"Trace\":\"#0
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(973):
>>> OC\\\\DB\\\\Connection->connect()\\n#1
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
>>> Doctrine\\\\DBAL\\\\Connection->executeUpdate('PRAGMA read_unc...',
>> Array,
>>> Array)\\n#2
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
>>> OC\\\\DB\\\\Connection->executeUpdate('PRAGMA read_unc...')\\n#3
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
>>> Doctrine\\\\DBAL\\\\Connection->setTransactionIsolation(2)\\n#4
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
>>> OC\\\\DB\\\\Connection->__const...
>>>
>>> PHP message:
>>>
>> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"PHP","message":"touch():
>>> Unable to create file \/home\/usf\/owncloud\/data\/owncloud.log because
>> No
>>> such file or directory at
>>>
>> \/owncloud\/lib\/private\/log\/owncloud.php#53","level":3,"time":"2016-04-16T22:26:45+00:00"}
>>>
>>>
>>> Symlinking does the same.
>>> Can someone tell me how can i move my datadir without moving all my
>>> owncloud installation files to abother location?
>>>
>>>
>>> OpenBSD-current, ownCloud 8.2, httpd, php-5.6, php-fpm

Reply via email to