External storage is read-only

Here is my setup. I created a mount in fstab with this:

//unraid/own /media/own cifs username=matt,password=***********,iocharset=utf8,uid=root,gid=root

It mounts great, and I can access everything through terminal no problem. I then mount Nextcloud external storage as Local to the /media/own folder, and I get the dreaded “You don’t have permission to upload or create files here”. If I don’t mount my unraid server, and just use the /media/own folder by itself, it works fine also. I did the CHMOD to 777, and CHOWN to www-data:www-data, but still the same thing

Does anyone have any other ideas for me?


It’s better to set the ownership of the mount to www-data and also set the chmod:

//unraid/own /media/own cifs username=matt,password=***********,iocharset=utf8,uid=www-data,gid=www-data,file_mode=0640,dir_mode=0750

That fixed the web issue! But, now my clients are unable to sync that folder lol Should those CHMOD’s be a little looser?

The file system permissions have nothing to do with the client. Because they connect through the server, and as long as the server can read and write it, there should be no problem. Unless you have other webdav-issues in your setup, but that’s hard to say with the given information. And it’s not related to this issue, so rather open a new topic.

I am going to start over fresh, as I have done some things to this VM that I am not sure are playing havoc with it. But, one more question and I am done I promise! If I mount those external shares in Nextcloud, am I able to access and change files on those shares on other machines, not using the Web, just accessing through SMB? Or does that mess with the database still?

Thanks for all your help!!!

If you use it as the main storage (aka. data-directory) you must not do manual changes. You can use the external storage feature which assumes that other applications have access to this storage as well. But the data-directory is considered to be exclusive for Nextcloud.

UPDATE: tflidd, you helped a lot and I appreciate it! The corrections you made to my fstab were right, except that I had to put it as file_mode=0640,dir_mode=0750, with a zero in front, then it would take each reboot. Thanks again for your help!!!

1 Like

Thanks for the feedback. I corrected my posting.