I'm trying to set up Owncloud on my Raspi following this howto: http://tech-blog.clericare.com/2013/08/how-to-deploy-owncloud-with-postgresql.html The Raspi should serve as an Owncloud server, a print server and a file server at the same time, that's why I'm using the chroot (following the advise in this answer to my previous question: Users and permissions on a Raspi which is both a home and an owncloud server).
In the first attempt I exactly followed the howto (except for the Owncloud version) and everything worked nicely. However, I then realized that I want the data folder to be on an external hard drive and not directly on the SD card. Therefore, I deleted the /var/lib/owncloud/public and /var/lib/owncloud/data folders and
- created a symlink /var/lib/owncloud/data pointing to a folder /media/Data/owncloud which is located on a partition of the external hard drive (which is mounted in /media/Data)
- reextracted the Owncloud tarball to /var/lib/owncloud/public
Then I accessed Owncloud from the browser in order to create the admin account. However with the symlink already present on the place of /var/lib/owncloud/data I always get the error:
Can't create or write into the data directory
I have chowned both the symlink and its target with the owncloud user. In the Owncloud login mask I tried both /data and /var/lib/owncloud/data as paths to the data folder (I would expect the first one to be correct, because the root is already set to /var/lib/owncloud/, the howto proposes second - but both variants give the same error).
Thanks for any hints how to get rid of the permission error!