/var/www/nextcloud not accessible (Permission denied)

Hey people,

I just finish a new fresh install of the VM appliance (2018-05-06-2342). Btw amazing job by the Dev !

I try to get access to the folder : /var/www/nextcloud/core to edit, delete few files but I got this:

Thank’s

These folders are usually owned by the web server user, which is www-data. So you need to become root (sudo -i) to enter these folders.

Run the following command to see the ownership and file permissions:
ls -al /var/www

Thank you @Schmu ,

But unfortunatly this is not working :crying_cat_face:

When I enter sudo -i I’m asked to enter the password of the ncadmin account, easy I just enter after the boot of the VM.

But it’s not working ->

I even try the default one nextcloud but not working also :thinking:

1 Like

Can you in general run any commands as root using sudo? If not, you may have changed your machines admin password at some point.

I just try :

I was invited to enter the password of ncadmin and it worked…

Still I cannot enter the /var/www/nextcloud

What worked for me was using the nautilus explorer, meaning running “sudo nautilus /var/www/nextcloud”, which opened the directory in the explorer with root rights.

Still having issues?

I am having the same issue, permission denied when accessed as ncadmin, how to I become www-data user to access the nextcloud directory

is it like sudo su -u www-data or something…

Hi, you need to type sudo -i to become root in Ubuntu.

thats what I thought but I think in the nextcloud VM ‘sudo -i’ is configured as shortcut to run the first time set up script. how do I get past that. everytime I issue ‘sudo -i’ it starts the start up next cloud set up script.

Then you have failed to run the first setup and exited it before it was done.

The last thing that happens is that the startup script is removed, and if you don’t let the first setup script finish properly it will run every time you become root.