Just started out using Dietpi and it's awesome and very intuitive.
Only problem so far is, having installed ownCloud and then setting up. Tried to set the DataFolder as /var/lib/owncloud/data, as described in the configuration guide, but received an error along the lines of write access denied. Then tried the default option /var/www/owncloud/data and that worked fine.
Does it make a difference having it at /var/www/owncloud/data ? Just wondering whether or not to reinstall ownCloud.
Thanks,
Tin Minnow
[SOLVED] Owncloud Data Directory
[SOLVED] Owncloud Data Directory
Last edited by Deleted User 612 on Sat Jul 09, 2016 9:57 pm, edited 1 time in total.
Re: Owncloud Data Directory
The recommendation is that your data folder is not under the www directory to make it more secure. Your problem is probably due to wrong file/folder permissions.
Re: Owncloud Data Directory
Thanks, that's good to know. How would I go about changing the file permisions for that folder?johnvick wrote:The recommendation is that your data folder is not under the www directory to make it more secure. Your problem is probably due to wrong file/folder permissions.
Re: Owncloud Data Directory
Hi Tin,Tin Minnow wrote:Thanks, that's good to know. How would I go about changing the file permisions for that folder?
DietPi-Software sets up a symlink (shortcut) from /var/lib/owncloud/data to /mnt/dietpi_userdata during install.
Lets check to see if its active and check permissions, please run these and paste results:
Code: Select all
ls -lha /var/lib/owncloud/data
ls -lha /mnt/dietpi_userdata
ls -lha $(readlink /mnt/dietpi_userdata)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Owncloud Data Directory
Hi FourdeeFourdee wrote:
Lets check to see if its active and check permissions, please run these and paste results:Code: Select all
ls -lha /var/lib/owncloud/data ls -lha /mnt/dietpi_userdata ls -lha $(readlink /mnt/dietpi_userdata)
These are the results. I did actually reinstall Dietpi and have yet to set up my owncloud admin account/data folder. Still receiving error 'Can't create or write into the data directory /var/lib/owncloud/data ' when trying.
Code: Select all
~# ls -lha /var/lib/owncloud/data
ls: cannot access /var/lib/owncloud/data: No such file or directory
~# ls -lha /mnt/dietpi_userdata
lrwxrwxrwx 1 root root 10 Jul 4 20:49 /mnt/dietpi_userdata -> /mnt/usb_1
~# ls -lha $(readlink /mnt/dietpi_userdata)
total 101M
drwxr-xr-x 4 root root 4.0K Jul 4 21:19 .
drwxr-xr-x 5 root root 4.0K Jul 4 20:49 ..
drwx------ 2 root root 16K Jul 4 20:39 lost+found
drwxrwx--- 3 www-data www-data 4.0K Jul 4 21:26 owncloud_data
-rw------- 1 root root 100M Jul 4 20:49 .swapfile
Tin Minnow
Re: Owncloud Data Directory
Hi Tin,
Thanks for the results.
It looks like the documentation is incorrect.
/var/www/owncloud/data (not /var/lib/*) is the correct location to use when setting up Owncloud for the first time:
I've updated the documentation: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=47#p47. Many thanks for reporting this Tin, and please let me know if this resolves the issue.
Thanks for the results.
It looks like the documentation is incorrect.
/var/www/owncloud/data (not /var/lib/*) is the correct location to use when setting up Owncloud for the first time:
Code: Select all
root@DietPi:~# ls -lha /var/www/owncloud/data
lrwxrwxrwx 1 www-data www-data 34 Jul 6 18:24 /var/www/owncloud/data -> /mnt/dietpi_userdata/owncloud_data
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Owncloud Data Directory
Ok great, thanks for letting me know, it works perfectly now. And do you know if it is a security risk having it in that directory (/var/www) as johnvick suggested?
johnvick wrote:The recommendation is that your data folder is not under the www directory to make it more secure. Your problem is probably due to wrong file/folder permissions.
Re: Owncloud Data Directory
Not sure, but I can't access the data when browsing the web url /var/www/owncloud/data:Tin Minnow wrote:Ok great, thanks for letting me know, it works perfectly now. And do you know if it is a security risk having it in that directory (/var/www) as johnvick suggested?
johnvick wrote:The recommendation is that your data folder is not under the www directory to make it more secure. Your problem is probably due to wrong file/folder permissions.
http://192.168.0.112/owncloud/data
Its also a symlink, so the physical data is located elsewhere, outside of /var/www.
You can use the below physical location (flash), or symlink (usb/custom) rather than /var/www/owncloud/data during 1st run setup. Either way, its outside the /var/www directory.
Code: Select all
/mnt/dietpi_userdata/owncloud_data
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Re: Owncloud Data Directory
That's good enough for me!Fourdee wrote:Not sure, but I can't access the data when browsing the web url /var/www/owncloud/data:Tin Minnow wrote:Ok great, thanks for letting me know, it works perfectly now. And do you know if it is a security risk having it in that directory (/var/www) as johnvick suggested?
johnvick wrote:The recommendation is that your data folder is not under the www directory to make it more secure. Your problem is probably due to wrong file/folder permissions.
http://192.168.0.112/owncloud/data
Its also a symlink, so the physical data is located elsewhere, outside of /var/www.
You can use the below physical location (flash), or symlink (usb/custom) rather than /var/www/owncloud/data during 1st run setup. Either way, its outside the /var/www directory.Code: Select all
/mnt/dietpi_userdata/owncloud_data