First time install, permissions 0770 error near the end

I was following this installation guide. He uses apache2, mariadb, myphpadmin, and a bunch of PHP stuff.

I am attempting the install on a fresh Ubuntu (normal desktop) install on an old (but wiped) PC.
I am also hosting it on my own IP, and do not want to pay for a domain name.
Instead of using the default /www/var/html/data folder, I am mounting an 8TB logical volume (comprised of 2 4TB HDDs) to /home/jollyj/server, and changed the web client accordingly.

EDIT: Have just realised that these HDDs are NTFS, which have caused issues for others. I have added to fstab this line which has been suggested by others, but it does not seem to be working for me.

/dev/LogicalVolume1/Volume1 /home/jollyj/server ntfs defaults,uid=33,grid=33,umask=007 0 1

EDIT 2: the copy-pastaed solution above was for someone else whose UID was 33. I checked mine by typing id into terminal, and mine were 1000. So replace 33 with 1000.
Now I have a problem with umask making the mounted directory unreadable by everyone… Will try to figure that out

2 problems:

  1. Potentially minor problem that hasn’t been a problem yet: I did not have .htaccess and .user.ini files (mentioned around 14:35) in the video. Yes I checked with ls -al.

  2. Major problem stopping me from continuing: The website (accessed via my external IP) says


Your data directory is readable by other users

Please change the permissions to 0770 so that the directory cannot be listed by other users.

What I’ve tried:

sudo chmod 0770 /home/jollyj/server/
sudo chown www-data:www-data /home/jollyj/server/

chown -R www-data:www-data /home/jollyj/server/
find /home/jollyj/server/ -type d -exec chmod 750 {} \;
find /home/jollyj/server/ -type f -exec chmod 640 {} \;

None of the above worked or changed anything, I’m getting the same error screen.

Anyone know of a solution?

Hello, it is not about the root directory of your nextcloud install.
It is about the “data” folder. By default the data folder is inside the Nextcloud folder.

In that case, I shouldn’t have a problem.

I did not mess with the nextcloud install folder, but I have changed the default “data” folder to /home/jollyj/server, which is no longer nested in the nextcloud folder.

EDIT: I have noticed that the 2 4TB HDDs are NTFS. I have added this information and a non-working attempt in the OP, please take a look.

Problem PARTIALLY solved by adding

/dev/LogicalVolume1/Volume1 /home/jollyj/server ntfs defaults,uid=1000,grid=1000 umask=007 0 1

to fstab by
sudo vim /etc/fstab

Check your own uid and gid by typing id in terminal, and personalise your volume and mnt point directories.

EDIT: OK umask is part of the problem. I can either have control over the mounted point, and nextcloud will complain, or nobody has read/write access and nextcloud will let me in but I can’t do anything with an empty /data/ folder. WTF. “Mark as Solution” has been removed.

EDIT 2: Now I’m getting http error 500 when accessing the IP, and HY000/2002 when accessing phmyadmin. Searching for a fix.

I solved the problem too. I inserted the following line into fstab:
UUID=0E96A3FA96A3E087 /mnt/orico ntfs defaults,nls=utf8,uid=www-data,gid=www-data,dmask=007,windows_names 0 0

orico - name my hdd (change to your)
UUID=0E96A3FA96A3E087 - change to your


I recently ran into this problem after an SD card crashed on my Rapberry Pi. Unfortunately I didn’t write down in One Note what I was using for the mount settings for the hard drive.

There is lot of good material about what happens when using ntfs drives with Linux (it doesn’t surprise me that there can be some red tape to make it work) but what is the purpose for making the umask=007? I thought should it should have been 770.

Solved Too
I have installed the nextcloud in a Virtual Machine (VirtualBox) with Host Windows 7 and Guest Ubuntu Server.
I changed the default “data” folder of nextcloud to a shared folder mounted with VirtualBox Guest Additions and got the same error: “Please change the permissions to 0770 so that the directory cannot be listed by other users.”
The problem was solved by editing the /etc/fstab as follow:

(Your Shared Folder) (Your Path to Mountpoint) vboxsf defaults,uid=www-data,gid=www-data,dmask=007 0 0

I still have this problem can anyone tell me how to fix it on rasbian OS ???
Thank you

hi, did u find the solution, im having the same problem

google brings me at this old post when looking for the same problem.
I just solved by assigning uid and grid to www-data

the fstab entry should look like:

/dev/LogicalVolume1/Volume1 /home/jollyj/server ntfs defaults,uid=www-data,grid=www-data umask=007 0 1

is the /dev/logicalvolume1/volume1 the path to your external hdd?

Solved my issue too.

UUID=E60E44800E444BAD /mnt/wwn-0x5000c500b45ac084-part2 ntfs defaults,nls=utf8,uid=www-data,gid=www-data,dmask=007,windows_names 0 0

if you have an entry before for the same mount point. please remove. Otherwise it would be duplicate