Im having problems moving data directory to external drive

Steps to reproduce

  1. Follow guide on how to move data directory.

Expected behaviour

I moved the data folder to a mounted drive, and after following the guide i would be able to access my files as normal.

Actual behaviour

After following the guide i can see the files, but not download them. I can also not make new folders, or upload new files.

Server configuration

Operating system: Ubuntu 17.10

Web server: Nginx

Database: MySQL

PHP version: PHP 7.1 (PHP7.1-fpm)

ownCloud version:

Updated from an older ownCloud or fresh install: Fresh install

Where did you install ownCloud from: ownCloud repository

Signing status (ownCloud 9.0 and above): No errors have been found.

The content of config/config.php:

"config": {
        "updatechecker": false,
        "instanceid": "ocndg7hio42q",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
        "datadirectory": "\/mnt\/volume_lon1_01\/owncloud\/data\/",
        "overwrite.cli.url": "https:\/\/",
        "dbtype": "mysql",
        "version": "",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"

List of activated apps:

  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.3.2
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.1
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - market: 0.2.4
  - notifications: 0.3.2
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.3
  - updatenotification: 0.2.1

Are you using encryption: yes

Client configuration

Browser: Firefox

Operating system: Windows 10

This sounds like a typical permissions problem, I guess your apache user doesn’t have the necessary write permissions on the new data folder, potentially because the owner is wrong. You should be able to use the commands chown (to change file/directory ownership) and chmod (to modify read/write/execute [or list directory content] permissions), to set this right and ls -l to see the permissions. Documentation on how to use these commands is widely available, a good starting point is always a man page.
A nice trick with chown and chmod is to use --ref. Then you don’t actually have to know the permissions or users, you can just point to a folder/file which already has the correct permissions.

1 Like

Some more info on the external drive would be interesting as well.


True, you will have problems on a NTFS formatted drive as it doesn’t support POSIX file permissions.

1 Like

Hey thank you for the help, I got it working by changing the write permissions.

1 Like