Can't create or write into the data directory

Dear next cloud team,
after i configured the permission for the directory, the installer gave me an error
"can’t create or write into the data directory"
I used nginx with user www and user group www.
I also used the following commands:
chown -R www:www /home/data
chmod -R 755 /home/data
didn’t work.
Can you help?

1 Like


can you post your nginx.conf? ( /etc/nginx/nginx.conf )

Did you set both permissions?
For the nextcloud directory and for the data directory?

  1. Unzip the nextloud

  2. Copy nextlcoud to your webfolder
    sudo cp -r nextcloud /var/www/

  3. Set permissions
    sudo chown www:www /var/www/nextcloud/ -R

  4. Create data directory
    sudo mkdir /home/data/

  5. Set permission for the data directory
    sudo chown www:www /home/data -R

could you please try to use www-data as user and group?

sudo chown www-data:www-data /var/www/nextcloud/ -R

sudo chown www-data:www-data /home/data -R

dont forget to change your nginx.conf
–> user www-data;

Problem solved. Really weird. If i set the directory to /home/wwwroot/data everything works…