Help with Nextcloud installation using Synology NAS as data storage

Im trying to install Nextcloud on Ubuntu Server 20.04 using Proxmox VM.
I also want to use my Synology NAS for the data folder storage.

This far I have followed the instructions here: Howto Install NextCloud 20 on Ubuntu 20.04.1 The classic way [Wiki]

Before I started the Nextcloud installation, I mounted my NAS storage to ubuntu. In my fsbtab for automount it says: 192.168.1.15:/volume1/nextcloud /mnt/nextcloud_data nfs defaults 0 0

The storage is mounted fine and after reboot I can still access my /mnt/nextcloud_data folder using sudo -i

Although I had big problems selecting this folder when I started the Nextcloud webinterface installation! It complained that it couldn’t find the folder… After much trial and error I somehow managed to get it working after I changed some permissions on my Synology NAS shared folder. I actually dont really know what I did to make it work, but I think it was after I granted the “admin” user to have access to the nextcloud_data folder.

Ok, so finaly the Nextcloud installation accepted my data folder and I could proceed to finalize my installation… And everything worked fin!

Until…

I then continued to follow the instructions, again from Howto Install NextCloud 20 on Ubuntu 20.04.1 The classic way [Wiki] for the Redis Memory cache, Nextcloud Security to enable https and certifications.

And now it complains about my data folder “is readable by other users, Please change the permissions to 0770 so that the directory can be listed by other users

Ok, so I tried using chmod -r 0770 /mnt/nextcloud_data with sudo -i privileges. But it says “Operation not permitted”…

I dont know if it is my Synology permissions for the shared folder that make this error, or if it is in the nextcloud/ubuntu installation?

I also cant reach my /var/www/nextcloud/ directory without sudo -i privileges anymore?

Please help!

Can you set the correct user. You must use the nextcloud user e.g. www-data.
Use user root, sudo -s or sudo
chown www-data:www-data /mnt/nextcloud_data
and the correct rights
chmod 755 /mnt/nextcloud_data

Actually i does not use NFS. Perhaps you must mount it for your special user. Search the internet for more details.

Thank you for really fast reply! :slight_smile:

Unfortunately I do get the same error when I try to do this. “Operation not permitted” :frowning:

I tried with both root and sudo!

Hopefully you only missed the needed parameter rw in your fstab.

This is how it looks…

Ok defaults includes rw. Sorry.

Please post the corresponding lines in
mount
and
ls -al /mnt/nextcloud

/mnt/nextcloud_data:
image

/mnt:
image

I do not understand. There are two users in the first screenshot. All data must be from the Nextcloud user.

www-data
1025

Because other (rwxrwxrwx) can also write i think nextcloud uses the user 1025
Can you post more details?

I dont understand either… :joy:

I have seen this before, and dont really understand where the 1025 comes from? Before I did the nextcloud installation, I did this: sudo chown -R www-data:www-data /mnt/nextcloud_data/ And then it was only the www-data user… But when I finished my installation it looked like this. Dont ask me why, or if it is correct or not.

Also, before I did the nextcloud installation. I was able to do the chown command without the “operation not permitted” issue, now I’m not! :frowning:

I can post whatever detail you want, just tell me… :slight_smile:

Sorry i do not have a Synology NAS. But i think the user 1025 (without a name) is an internal Synology NAS user while installing Nextcloud

For more details:
grep 1025 /etc/passwd

Nothing happens?

image

Ok, I started from the begining.

I deleted the nextcloud installation directory and removed the Synology NAS directory. I also removed the database and created a new one.

Then I downloaded nextcloud 22.2.0 and placed it in the /var/www/nextcloud/ dir.
Also I created a new share dir from Synology NAS, added user and group www-data. NFS settings as screenshot:
image

With Squash settings to “no mapping” I was able to change ownership of the dir and files to www-data and permissions to 775 using:
chown www-data:www-data /mnt/nextcloud_data
chmod 755 /mnt/nextcloud_data

Before starting the nextcloud installation it looks like this:
ls -al /mnt/
image

ls -al /mnt/nextcloud_data/
image

Ok, I now did all settings in the Nextcloud installation screen. But no luck, it now says it cant read/write to the /mnt/nextcloud_data dir.
So I changed the NFS Permissions/Squash settings in Synology nas to “Map all users to admin”. And now nextcloud accepted my /mnt/nextcloud_data folder and continued the installation process…

Until this shows up…
image

Ok, again… I changed the NFS Permissions in synology, Squash to “No mapping”.

AND TADA!!

Im in, nextcloud has now finaly completed the installation!

Checking the users in /mnt/nextcloud_data again gives me following output:
image

After a little bit of research I found out via Synology SSH that “1024” is the admin user of synology and “users” is the group. Its really sad I cant use the www-data user in synology for nextcloud.

Well, now it seems to work! We will see after a a couple of weeks usage if everything works as expected! :slight_smile:

Sorry i do not use Synology NAS. But perhaps this mapping or no mapping is the problem.

No worries! :slight_smile:

Okay, now I have another strange problem… I have three accounts on nextcloud.

  1. Thomas
  2. Sofie
  3. Temp

“Thomas” is the first one created when I installed nextcloud. This one is admin (or should be).
Second, I created one account for my wife “Sofie”. And lastly I created “temp” for test…

Here is the strange part… It seems that my account (Thomas, which should be admin) does not have full access as I have problems with uploading photos to my folders!
But, I have created a shared family folder which I can upload to without any problems at all!

Sofie’s account, she can upload wherever she wants to. To photos, or shared folder or main folder. Everything works… Good for her! :face_with_symbols_over_mouth: :joy:

That’s where I came up with this really good idea to create a new account (called temp) and maybe that account could be working just as good as my wifes account. But nope… :frowning: Same behaviour as my admin account. Can only upload to our shared family folder!!

What is happening!???

Here is the output of ls -al /mnt/nextcloud_data/
image

What does the green color overlay on Thomas and temp mean?
Sofie and __groupfolders are the one which is working and they are blue?

Any ideas or help is appreciated! :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.