Good Morning
Where can i find the resource to set proper folder permissions? I need to check my web directory and I am using external storage that is mounted in a different folder
Version im running is 19.0.0.12
Good Morning
Where can i find the resource to set proper folder permissions? I need to check my web directory and I am using external storage that is mounted in a different folder
Version im running is 19.0.0.12
The code needs to be readable by the webserver user (also writable if you want to use the updater app). The app-folder, config-folder and data-folder must also be writable for the webserver user (there is also a way to use read-only app-folders but then you can’t easily install apps).
If you use the webserver user and group as owner of all files and folders, you can use chmod 750 for folders and chmod 640 for files.
Thanks tflidd, currently should www-data be the owner? also what would the proper command be for the chmod?
sudo chmod -R 750 /location/data-folder
sudo chown www-data:www-data /location/data-folder
Thanks for the help
Hi @russhenry715,
I do have a same configuration and here are the steps you must check:
Check the “datadirectory” variable in /var/www/nextcloud/config/config.php
Here is my configuration: ‘datadirectory’ => ‘/media/MyCloud/data’,
Set the right permissions as bellow:
sudo chown -R www-data:www-data /media/MyCloud/
sudo chmod 750 /media/MyCloud/
Hope this helps.
Do you know what i am doing wrong, after i run the command root:root still is the owner for the data folder
@russhenry715
You must run the command using “sudo” or straight on root user “sudo su -” to make it works.
If you already did that. Then I don’t know what is going one.