Permissions of www-data on an addtional drive on Ubuntu 14.04
What worked on my end:
sudo chown -R www-data:www-data /path/to/ownCloud
sudo chmod -R 775 /path/to/ownCloud
sudo adduser YOURNAME www-data
Voila!
for ownCloud to work well, www-data must be the one that own all of that folders with both Read and Write. It's just that how it works.
That application running so smoothly with that approach I used.
Related videos on Youtube
KKyang
Updated on September 18, 2022Comments
-
KKyang almost 2 years
I'm trying to give rwx permissions to www-data in /media/bblab/Database/data to install OwnCloud.
bblab is my user name and Database is my disk label. The step I mount the drive is:
login as bblab (the user created when I installed Ubuntu)
open disk application and find an empty drive /dev/dm-2 (hard drive 2T*2 installed on motherboard with hardware RAID 1 (Gigabyte X79-UP4))
create a new partition on drive /dev/dm-2 and the partition is named /dev/dm-3
mount the partition /dev/dm-3 at /media/bblab
use terminal to change the permission of the media to 750
add group www-data to /media/bblab/Database
sudo chown -R www-data:www-data /media/bblab/Database/data
and now when use command
ls -al /mdeia/bblab/Database
, the result isdrwxr-x--- bblab www-data . drwxr-x--- root root .. drwxrwx--- www-data www-data data drwx------ root root lost+found
But OwnCloud still gives the following messages:
Can't create data directory (/media/bblab/Database/data/data)
This can usually be fixed by giving the webserver write access to the root directory.
Is there any step I'm doing wrong or have forgotten to do? Thanks!