I have a BananaPi with Bananian, Apache2 and OwnCloud.
Plugged into the Banana Pi is a NTFS-formatted HDD that gets mounted via ntfs-3g.
I created five users on the system and there is a
.NTFS-3G/UserMapping file inside the base-directory of the mounted partition, resulting in a UID/GID/SID mapping of the users and in automatically setting the
acl options when the partition gets mounted. (www-data is not included in the UserMapping-file.)
This partition contains a directory
shares for Samba-shares and a directory
The owner of the whole owncloud-tree is root:root and permissions are 777.
In order for apache to access the data and owncloud to work, the
owncloud/data directory has to belong to www-data:www-data. But if I try this:
chown -R www-data:www-data /media/hdd/owncloud/data
the ownership gets set to root:root, whatever owner the files and folders had before. This also happens for a single file:
chown www-data:www-data /media/hdd/owncloud/data/owncloud.log
and for every other place on the HDD:
chown -R www-data:www-data /media/hdd/shares/maximilian
But if I set the ownership to an arbitrary user, for example:
chown -R maximilian:maximilian /media/hdd/owncloud/data
it works perfectly fine!
Why can't I set the ownership to www-data then?