Sunday, January 13, 2013

cifs mounting with write permission!

I have been struggling to mount a network drive using cifs with write permission for a while. An today, I stumbled across this blog (http://microitblog.com/micro-it-blog/2011/04/21/mounting-cifs-shares-through-linux-with-write-permissions) and my problem solve!

I seems I have to pass on my user id as well as my network credential when I mount a drive. Hence, the mounting command should be:

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

If you don't know your uid, you can use the id -u <username> command to find it out.

For example, if you have a network share on 10.0.0.100 (it seems IP works better than NetBIOS name) with a share called shared, then the command should be

sudo mount -t cifs //10.0.0.100/shared ~/myfolder -o username=auser,password=mypassword,uid=1000

Hope this helps.

No comments: