We are running ownCloud on centos 7 and php 5.6 server. Recently, we changed the data directory. After changing data directory, files were not appearing in user’s folder we are required to run occ files:scan.
i think you need to tell your system that it should run php scripts like occ on the command line with the same PHP 7.0 version like it is doing for the web server.
There are various topics around this available, i found e.g. the following which could help you to correctly configure your environment: