0

I've been trying to get this software working for my webserver. It's called ownCloud. I had partitioned my hard drive just to host my files on my web server.

I made a new partition (128gb) and I've been trying to get it to work with ownCloud. But it will not work whatever I do.

It says this:

Data directory (/media/user/2CF254B6F254864C/ownCloud/data) is invalid

Please check that the data directory contains a file ".ocdata" in its root.
Cannot create "data" directory (/media/user/2CF254B6F254864C/ownCloud/data)

This can usually be fixed by giving the webserver write access to the root directory.

Even though I have that all there.

So, someone on their forum told me to use
chown -R www-data:www-data /media/user/2CF254B6F254864C/ownCloud/data, so I did.

But it didn't work. So then I kept going down the directories, chown'ing them.

I have www-data access to /media/user/ Is this a bad thing? I remember I had to reinstall because I accidentally chmod'ed root with 777.

How can I get this to work?

Volker Siegel
  • 13,065
  • 5
  • 49
  • 65
John
  • 1
  • Why can't you just mount the partition to a better directory, like /var/foobar or /mnt/data? This should be possible with an entry in fstab? See here: https://help.ubuntu.com/community/Fstab – noleti Sep 09 '14 at 06:33
  • It doesn't show up in my fdisk list, and it's not compatible, it says.

    `WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted. Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes

    Device Boot Start End Blocks Id System /dev/sda1 1 625142447 312571223+ ee GPT Partition 1 does not start on physical sector boundary.`

    – John Sep 09 '14 at 06:42
  • What does ls -ld /media/user/2CF254B6F254864C/ownCloud/data/.ocdata say? – Volker Siegel Sep 09 '14 at 06:47
  • -rw------- 1 user user 0 Sep 7 04:17 /media/user/2CF254B6F254864C/ownCloud/data/.ocdata

    The ownCloud forum told me to do chown -R www-data:www-data /media/user/2CF254B6F254864C/ownCloud/data/.ocdata to get it working, giving rights to www-data, but it has never worked.

    – John Sep 09 '14 at 06:49

2 Answers2

1

If you think that the root problem lies with the owner of the mountpoint then in the mount options you can specify uid and gid to set the user and group respectively for the mount. Read the manual page, man mount, for the specification of those options.

headkase
  • 265
0

I have the same problem

Data directory (...) is invalid  Please check that the data directory contains a file ".ocdata" in its root.

when i try to transfer my data folder from a partition to other one, and i change the permissions of .ocdata and did not work.

My solution was change the owner (not recursive) to mount's point partition and all work well:

$ chown www-data:www-data /mount_point 

Hola Tuve el mismo problema

Data directory (...) is invalid  Please check that the data directory contains a file ".ocdata" in its root.

Cuando traté de transferir mi carpeta de datos de una partición a otra, y cambié los permisos de .ocdata pero no funcionó.

Mi solución fue cambiar el propietario (no recursivo) al punto de montaje de la partición nueva y todo funcionó bien:

$ chown www-data:www-data /mount_point