Cannot change upload location

user_management
10

#1

Hi all, bit of a new user here and stumbling a bit to configure this the way I want.

I am having difficulties with uploading files to a location not in the owncloud install data folder. Currently user uploads get thrown in /var/web/owncloud/data/user, and I want them to go inside /mnt/Pool/owncloud/user for space purposes. I have changed the upload directory listed in NAS4FREE (my freeBSD distro), and also followed https://forum.owncloud.org/viewtopic.php?f=17&t=7118 to modify my .htaccess file. In all cases, and after restart of webserver (turn off webserver service, edit config, save, restart), files continue to upload to the data folder in the installation directory instead my other location.

Anyone have any ideas why I can't make it change upload location? No errors get posted to the log, it just straight up ignores the fact that I want the user's uploads to go to my dataset. Any help would be greatly appreciated here. Umbasa


#2

You might want to follow the official instructions in [1] as the forums posting looks quite outdated.

[1] https://doc.owncloud.org/server/10.0/admin_manual/maintenance/manually-moving-data-folders.html


#3

Nice! That's exactly what I was looking for. Just wondering though. Is user settings also stored in the data folder? I'd prefer to keep user settings in the original location so if the datapool gets wiped I don't need to rebuild the users... :slight_smile: Is this something that is possible?


#4

Ok, so doing this actually caused alot of problems (also the listed shell code was wrong) and made my files viewable to the internet. It was citing "Your data directory and your files are probably accessible from the Internet. The .htaccess file is not working. We strongly suggest that you configure your web server in a way that the data directory is no longer accessible or you move the data directory outside the web server document root." I removed the symlink and modified config.php again, made sure UID/GID are www:www and now I'm getting the following error (and the server doesn't load previews and says uploads are forbidden. Any ideas how to pursue?

{"reqId":"rsuwH4Xvqnyjiw2sy29L","level":3,"time":"2017-05-20T18:07:55+00:00","remoteAddr":"192.168.0.11","user":"maria","app":"PHP","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/18?width=1400&height=1400&c=099a84bcd69ce1acec7529780f396062&requesttoken=NW9gNSQzNyIPXQoBdiIkKAUhIQUZFRF6AhtlDgkkC3Q%3D%3At6TSADCzx7rv4fIrwUlC6DX%2FdA0tNVhAXNjTclbXlXg%3D","message":"fopen(\/var\/web\/owncloud\/data\/maria\/thumbnails\/18\/1400-1400-with-aspect.png): failed to open stream: No such file or directory at \/var\/web\/owncloud\/lib\/private\/Files\/Storage\/Local.php#276"}
{"reqId":"EjeAcNfsaJXjCVpgDkO7","level":3,"time":"2017-05-20T18:19:07+00:00","remoteAddr":"192.168.0.11","user":"maria","app":"PHP","method":"GET","url":"\/index.php\/apps\/gallery\/preview\/18?width=1400&height=1400&c=099a84bcd69ce1acec7529780f396062&requesttoken=GB4GXzRDBQs8ARM1IDcmPRECKxJ8HmY3NTMYCHEYUF4%3D%3AYG29Q4qSKkkBbsKgcvfTSO%2FbSiMr6j3ksS5XeNLcB8I%3D","message":"fopen(\/var\/web\/owncloud\/data\/maria\/thumbnails\/18\/1400-1400-with-aspect.png): failed to open stream: No such file or directory at \/var\/web\/owncloud\/lib\/private\/Files\/Storage\/Local.php#276"}