Score:0

After upgrade to 22.04 cifs uses uid and gid from remote device instead the specified a mount

ni flag

For many years I have mounted my Synology NAS via cifs with the uid and gid options in /etc/fstab, so Ubuntu presented the file tree as owned by this user/group and the NAS wrote the files as written by the user specified in the mount. This worked fine.

Now I just upgraded to Ubuntu 22.04 and it seems to have taken the approch to read and respect the permissions in the filesystem on the NAS. The issue is it uses the nummeric IDs, so on my Ubuntu my user is 1000 but on the NAS it is 1026 and thus Ubuntu gives me a permission denied although the NAS is just fine with me reading or writing files (when I uses sudo on Ubuntu).

How can I get cifs to just accept the uid and gid I specify and just ignore what permission the NAS tells?

Score:0
hr flag

I had this issue too, but using this fixed it.

//machine/documents /mnt/machine/documents cifs vers=1.0,forceuid,forcegid,mfsymlinks,credentials=/root/.smbcredentials,rw,_netdev,rsize=32768,wsize=32768,uid=1000,gid=1000,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Score:0
as flag

This is a known bug in Ubuntu 22.04. You can either downgrade to Ubuntu 20.04, or mount the NAS with the "nounix" option.

simonmikkelsen avatar
ni flag
I used the nounix option to get running again. Thank you very much.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.