I manged to solve this after some investigation. The error was due to three closely related issues.
First of all I had only created the kikkmikk user on the server, not on the client:
Code:
sudo useradd kikkmikk
So apparently Ubuntu logged in as guest, since the user didn't exist on the client.
Secondly, I had to add the uid and gid to /etc/fstab (use id -u <user> and id -g <group> to list them):
Code:
//192.168.19.190/filmer /home/filer/felles/jiji/filmer cifs iocharset=utf8,credentials=/root/.smbcredentials,uid=1002,gid=1002,file_mode=0664,dir_mode=0775 0 0
But the user permissions were still not functioning correctly. I could now create files and folders, but they were created with another group owner on the server for some reason. I found the cause was that the kikkmikk GID was different on the server and the client, i.e. GID for kikkmikk was 1002 on the server and 1001 on the client. According to this thread, changing GID is cumbersome. So I changed the user in .smbcredentials to another one with equal UID/GID on both server and client.
Also I changed the smb.conf settings a bit:
Code:
[filmer]
path = /home/kikkmikk/filmer
read only = Yes
guest ok = No
browseable = Yes
create mask = 0664
directory mask = 0775
write list = @kikkmikk
force user = kikkmikk
force group = kikkmikk
Remember to run the following when you change smb.conf to make the changes take effect
Code:
sudo service smbd reload
sudo service nmbd reload
And run
Code:
sudo umount /path/to/mountpoint
sudo mount -a
when you have changed the /etc/fstab file or .smbcredentials file. If you credentials are wrong, mount - a will give you a Permission Denied error.
Hope this helps someone else.
Bookmarks