SMB : Write permission denied from Linux to Nextcloudpi



Hello everyone. I installed Nextcloudpi on a Rock64 and enabled SMB sharing from the web-GUI.

I have an admin account (_ncp_, just for admin stuff) and a user account (_usr_, where I have my files).

When I log in my Nexcloudpi from Ubuntu (via Nautilus), I am asked for a name and password. I use the name _usr_ and the password that was displayed in the SMB section of the web-GUI.

Then, a list of SMB folders appear :

  • print$
  • ncp-ncp
  • ncp-usr

When I go to the _ncp-usr_ directory, I can read the files (except sound and video files), but I can’t write inside (impossible to copy-paste or save a file). A pop-up says something like “permission denied”.

How do I write on it? I thought that with SMB it was easy to share files locally, but I’m having trouble. I have read the blog tutorial writen by @nachoparker but I am afraid of doing something wrong/dangerous on smb.conf so I need your help.

Thank you very much for your kind help.


Weird, I am using nemo file manager and I can create and modify files without issues


Thank you nachoparker, is there anything to do from Ubuntu side ? (for example, to connect to SMB as my Ubuntu user account, and not as usr from Nextcloudpi). So far, this is how I do :

Also, when I go to smb.conf, I see the following :

    path = /media/NCP/ncdata/usr/files
    writeable = yes
;       browseable = yes
    valid users = usr
    force user = www-data
    force group = www-data
    create mask = 0770
    directory mask = 0771
    force create mode = 0660
    force directory mode = 0770

    path = /media/NCP/ncdata/ncp/files
    writeable = yes
;       browseable = yes
    valid users = ncp
    force user = www-data
    force group = www-data
    create mask = 0770
    directory mask = 0771
    force create mode = 0660
    force directory mode = 0770

I see that there is a semi-colon near browseable, for both ncp-ncp and ncp-usr. Why those lines are not like the others ?

Thank you !


The colon means that the line is commented out, because that’s the default value (in case you want to un-comment it out and change it)

you have to use your NC usernames and the password from ncp-web, as you already did


Thank you for your feedback, I have found what was the issue : actually, everything in root of ncp-usr is readable and writable (I can save a file, delete it, write it, etc.), but when I go into the sub-folders of ncp-usr, I can’t neither write nor copy-paste. Those sub-folders, have been made in the HDD before installing Nextcloupi… to conclude, this means it is a permission issue.

This issue is almost solved, but I am a very beginner with chmod and chown : please, could you just help me how I can get the permission again ?

I would like to get permission to read & write, but I don’t want the world have any of those permissions (this is private data, so you can imagine why). Thank you so much for your help !


run nc-fix-permissions from ncp-web or ncp-config


Your suggestion worked perfectly. Thank you very much, fortunately, there are people like you who can help others, for which I am grateful !