In my /etc/fstab I have multiple lines similar to

//myserver/myshare /media/Server/myshare cifs credentials=/home/myuser/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 

However I can't access all the shares. Investigating the problem I found that the folders where the shares are mounted have weird ownerships. Most of them are owned by the user root and the group root. One of them is owned by my user but then there are strange ones. One has speech-dispatcher as the owner and utempter as the group. Then there's one that's owned by the group 1005 and one that's owned by www-data group.

These shares are served from a Ubuntu server and I believe these groups and owners come from there. The ones that I said have root:root owner are currently disconnected from the server. The one that is owned by me is a personal home folder share. Could it be that the server tells my machine the ids of the shares and because they don't map one to one on my machine and the server they are seen as these strange groups and users? And since my computer doesn't have a group with id 1005 it shows as just the number in ls -la?

How do I fix this? I want all the mounts to be owned by my own user.

I tried dismounting the shares and changing the share folders' ownership with chown. This worked partly: Now I can access the share that had root:1005 owner, but the ones with a group or user id which is found locally too don't work.


You must define the user and group when you configure the fstab mount for the share if you want to control the user (uid) or group (uid). Maybe something like this:

//myserver/myshare /media/Server/myshare cifs uid=1000, gid=100, credentials=/home/myuser/.smbcredentials,iocharset=utf8,sec=ntlm 0 0

Note that the uid is set for the first user (1000) (You I suppose) and the gid is set for user-group named users (gid=100)

The man page for all the options is

man mount.cifs

Are you the only one who access these shares on your server? If yes, can you change it on your server? What happen if you access the files via nautilius and standar gvfs instead of cifs-mount?

I usaly create the folders unter /mnt and give my user or the groupe users with chown rights to it and than mount it.

for example to change the groupe of a folder you can

sudo chown :users /path/to/your/folder


  • In Nautilus selecting Connect to server works on every share. Chowning the mount folders doesn't work as it changed them back. – MikkoP Jan 2 '16 at 7:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.