Re: owncloud - external files directory

2016-04-17 Thread Joseph Oficre
It sounds really nice, ill try, thank you a lot!

2016-04-17 15:07 GMT+03:00 Erling Westenvik :

> On Sun, Apr 17, 2016 at 02:20:23PM +0300, 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)
>
> Then I would recommend an external disk and mount it somewhere inside
> the chroot, like /var/www/data. I have a setup like that on an old
> OpenBSD server running owncloud version 6-or-something.
>
> $ cat /etc/fstab | grep data
> f1e6a6c8d1b4fc94.p /var/www/data ffs rw,nodev,nosuid 1 2
>
> $ mount
> ...
> /dev/sd3p on /var/www/data type ffs (local, nodev, nosuid)
> ...
>
> Regards,
>
> Erling
>
> >
> > 2016-04-17 14:12 GMT+03:00 Erling Westenvik  >:
> >
> > > 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\":\"DoctrineDBALDBALException\",\"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):
> > > > OCDBConnection->connect()\\n#1
> > > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > > Array,
> > > > Array)\\n#2
> > > >
> > >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > > >
> > >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > > > OCDBConnection->__cons...
> > > > PHP message:
> > > >
> > >
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > > >
> {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> > > > OCDBConnection->connect()\\n#1
> > > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > > Array,
> > > > Array)\\n#2
> > > >
> > >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > > >
> > >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > > > OCDBConnection->__const...
> > > > PHP message:
> > > >
> > >
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > > >
> {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> > > > OCDBConnection->connect()\\n#1
> > > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > > Array,
> > > > Array)\\n#2
> > > >
> > >
> \\\/owncloud\\\/3rdparty\\

Re: owncloud - external files directory

2016-04-17 Thread Martijn van Duren
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 :
> 
>> 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\":\"DoctrineDBALDBALException\",\"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):
>>> OCDBConnection->connect()\\n#1
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
>>> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
>> Array,
>>> Array)\\n#2
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
>>> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
>>> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
>>> OCDBConnection->__cons...
>>> PHP message:
>>>
>> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
>>> {\"Exception\":\"DoctrineDBALDBALException\",\"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):
>>> OCDBConnection->connect()\\n#1
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
>>> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
>> Array,
>>> Array)\\n#2
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
>>> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
>>> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
>>> OCDBConnection->__const...
>>> PHP message:
>>>
>> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
>>> {\"Exception\":\"DoctrineDBALDBALException\",\"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):
>>> OCDBConnection->connect()\\n#1
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
>>> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
>> Array,
>>> Array)\\n#2
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
>>> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
>>> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
>>> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
>>>
>> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
>>> OCDBConnection->__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
>

Re: owncloud - external files directory

2016-04-17 Thread Black Rider
El Sun, 17 Apr 2016 14:20:23 +0300, Joseph Oficre escribió:

> 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)

If you only want to upload and download, a more simple protocol such as 
FTP or SFTP might be easier to set and more secure. You can use your /
home for keeping the files easily with those. Nowadays, there are quality 
clients for every popular platform, even in default installs.

If you plan to have much Owncloud service data, your best option is to 
make your /var larger. Seriously. No point in messing with chroot or 
binded mounts, online mounts or whatever if you can just remake the 
filesystem layout.



Re: owncloud - external files directory

2016-04-17 Thread Erling Westenvik
On Sun, Apr 17, 2016 at 02:20:23PM +0300, 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)

Then I would recommend an external disk and mount it somewhere inside
the chroot, like /var/www/data. I have a setup like that on an old
OpenBSD server running owncloud version 6-or-something.

$ cat /etc/fstab | grep data
f1e6a6c8d1b4fc94.p /var/www/data ffs rw,nodev,nosuid 1 2

$ mount
...
/dev/sd3p on /var/www/data type ffs (local, nodev, nosuid)
...

Regards,

Erling

> 
> 2016-04-17 14:12 GMT+03:00 Erling Westenvik :
> 
> > 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\":\"DoctrineDBALDBALException\",\"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):
> > > OCDBConnection->connect()\\n#1
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > Array,
> > > Array)\\n#2
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > > OCDBConnection->__cons...
> > > PHP message:
> > >
> > {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > > {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> > > OCDBConnection->connect()\\n#1
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > Array,
> > > Array)\\n#2
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > > OCDBConnection->__const...
> > > PHP message:
> > >
> > {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > > {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> > > OCDBConnection->connect()\\n#1
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> > Array,
> > > Array)\\n#2
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> > >
> > \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctri

Re: owncloud - external files directory

2016-04-17 Thread Joseph Oficre
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)

2016-04-17 14:12 GMT+03:00 Erling Westenvik :

> 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\":\"DoctrineDBALDBALException\",\"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):
> > OCDBConnection->connect()\\n#1
> > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> Array,
> > Array)\\n#2
> >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > OCDBConnection->__cons...
> > PHP message:
> >
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> > OCDBConnection->connect()\\n#1
> > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> Array,
> > Array)\\n#2
> >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > OCDBConnection->__const...
> > PHP message:
> >
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> > {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> > OCDBConnection->connect()\\n#1
> > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> > DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...',
> Array,
> > Array)\\n#2
> >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> > OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> > \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> > DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> >
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> > OCDBConnection->__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-f

Re: owncloud - external files directory

2016-04-17 Thread Erling Westenvik
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\":\"DoctrineDBALDBALException\",\"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):
> OCDBConnection->connect()\\n#1
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
> Array)\\n#2
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> OCDBConnection->__cons...
> PHP message:
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> OCDBConnection->connect()\\n#1
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
> Array)\\n#2
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> OCDBConnection->__const...
> PHP message:
> {"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
> {\"Exception\":\"DoctrineDBALDBALException\",\"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):
> OCDBConnection->connect()\\n#1
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
> DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
> Array)\\n#2
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
> OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
> \\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
> DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
> \\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
> OCDBConnection->__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



owncloud - external files directory

2016-04-17 Thread Joseph Oficre
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:

PHP message:
{"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"index","message":"Exception:
{\"Exception\":\"DoctrineDBALDBALException\",\"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):
OCDBConnection->connect()\\n#1
\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
Array)\\n#2
\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
OCDBConnection->__cons...
PHP message:
{"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
{\"Exception\":\"DoctrineDBALDBALException\",\"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):
OCDBConnection->connect()\\n#1
\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
Array)\\n#2
\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
OCDBConnection->__const...
PHP message:
{"reqId":"HMQmV6NKyZ0Af967TUia","remoteAddr":"192.168.0.102","app":"core","message":"Exception:
{\"Exception\":\"DoctrineDBALDBALException\",\"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):
OCDBConnection->connect()\\n#1
\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(203):
DoctrineDBALConnection->executeUpdate('PRAGMA read_unc...', Array,
Array)\\n#2
\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(621):
OCDBConnection->executeUpdate('PRAGMA read_unc...')\\n#3
\\\/owncloud\\\/lib\\\/private\\\/db\\\/connection.php(135):
DoctrineDBALConnection->setTransactionIsolation(2)\\n#4
\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DriverManager.php(172):
OCDBConnection->__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