Mounting CIFS shares through Linux with write permissions

Mounting a CIFS share in Linux is fairly simple:

sudo mount -t cifs //server/share /mount/point -o username="user"

So after this you can mount and read the share, problem is, you can't write to it, lets look at the permission (mounting to /mnt/test)

[caption id="attachment_8" align="alignnone" width="300" caption="Permission issue with mount.cifs"][/caption]

We get 755 permissions, which are good for just reading and executing. The problem is that a regular user on the desktop can't write to the share. What we need to do is modify the command:

sudo mount -t cifs //server/share /mount/point -o username="user",uid="uid#"

Where UID# is the local user's User ID. This will keep the folder permissions to 755, but modify the ownership to the user specified in the UID.

If you don't know your UID. enter this:

id -u "username"

This helped me a lot recently with a fedora desktop for a user (who says that these days) and I hope it helps you as well.

- Timothy Matthews