Permissions of www-data on an addtional drive on Ubuntu 14.04

6,454

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.

Share:
6,454

Related videos on Youtube

KKyang
Author by

KKyang

Updated on September 18, 2022

Comments

  • KKyang
    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:

    1. login as bblab (the user created when I installed Ubuntu)

    2. 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))

    3. create a new partition on drive /dev/dm-2 and the partition is named /dev/dm-3

    4. mount the partition /dev/dm-3 at /media/bblab

    5. use terminal to change the permission of the media to 750

    6. add group www-data to /media/bblab/Database

    7. sudo chown -R www-data:www-data /media/bblab/Database/data

    and now when use command ls -al /mdeia/bblab/Database, the result is

    drwxr-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!