Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to mount windows share on my laptop and everything mounts ok but somehow I get permission denied when I try to create new file inside mounted folder. I tried noperm, uid, gid, noacl etc. and nothing seems to work. Everyone who use windows mounts share with same credentials have full r/w access. Here is how I mount:

piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777 //10.36.253.222/dysk\ f/ samba/

mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,uid=1000,gid=1000,user=***,pass=********
piotrek@piotrek-Vostro-2520:~/tmp$ cd samba/
piotrek@piotrek-Vostro-2520:~/tmp/samba$ ls -la
total 4
drwxrwxrwx 2 piotrek piotrek    0 mar 27 13:19 .
drwxrwxr-x 3 piotrek piotrek 4096 kwi  9 12:41 ..
drwxrwxrwx 0 piotrek piotrek    0 mar 18 11:50 AS-SET
drwxrwxrwx 0 piotrek piotrek    0 mar 27 13:29 EDUKACJA
drwxrwxrwx 0 piotrek piotrek    0 mar 18 11:52 RECYCLER
drwxrwxrwx 0 piotrek piotrek    0 cze  5  2012 System Volume Information
piotrek@piotrek-Vostro-2520:~/tmp/samba$ touch abc
touch: cannot touch `abc': Permission denied

What am I doing wrong?

I'm using Ubuntu 12.10.

//EDIT

I've tried options that were suggested in comments but still no luck:

piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlm //10.36.253.222/dysk\ f/ samba/                                                                         
[sudo] password for piotrek:                                                                                                                                                                                                                                          
Sorry, try again.                                                                                                                                                                                                                                                     
[sudo] password for piotrek:                                                                                                                                                                                                                                          
Sorry, try again.                                                                                                                                                                                                                                                     
[sudo] password for piotrek:                                                                                                                                                                                                                                          
mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlm,uid=1000,gid=1000,user=***,pass=********                                                                                              
piotrek@piotrek-Vostro-2520:~/tmp$ touch samba/dddd
touch: cannot touch `samba/dddd': Permission denied                                                                                                                                                                                                                   
piotrek@piotrek-Vostro-2520:~/tmp$ sudo umount samba/
piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmi //10.36.253.222/dysk\ f/ samba/
mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmi,uid=1000,gid=1000,user=***,pass=********
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmv2 //10.36.253.222/dysk\ f/ samba/
mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmv2,uid=1000,gid=1000,user=***,pass=********
piotrek@piotrek-Vostro-2520:~/tmp$ touch samba/dddd
touch: cannot touch `samba/dddd': Permission denied
piotrek@piotrek-Vostro-2520:~/tmp$ sudo umount samba/
piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmv2i //10.36.253.222/dysk\ f/ samba/
mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmv2i,uid=1000,gid=1000,user=***,pass=********
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmssp //10.36.253.222/dysk\ f/ samba/
mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmssp,uid=1000,gid=1000,user=***,pass=********
piotrek@piotrek-Vostro-2520:~/tmp$ touch samba/dddd
touch: cannot touch `samba/dddd': Permission denied
piotrek@piotrek-Vostro-2520:~/tmp$ sudo umount samba/
piotrek@piotrek-Vostro-2520:~/tmp$ sudo mount -v -t cifs -o username=***,password=***,uid=1000,gid=1000,rw,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmsspi //10.36.253.222/dysk\ f/ samba/
mount.cifs kernel mount options: ip=10.36.253.222,unc=\\10.36.253.222\dysk f,noperm,noacl,file_mode=0777,dir_mode=0777,sec=ntlmsspi,uid=1000,gid=1000,user=***,pass=********
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
piotrek@piotrek-Vostro-2520:~/tmp$

//EDIT 2

Don't know why but today it suddenly started working with my first mounting command. Probably server restart was required to make it working but you can never be sure with windows...

share|improve this question
    
What is permission in server side ? is writeable = Yes is enable ? –  Rahul Patil Apr 10 '13 at 7:36
    
It's windows xp machine and everyone that connects to it from windows have read and write permissions so I suppose it is set. –  piotrekkr Apr 10 '13 at 8:07
    
is that xp machine in Domain member of what ? –  Rahul Patil Apr 10 '13 at 8:20
    
seems remote share not writable, have you checked from another machine like windows ? –  Rahul Patil Apr 10 '13 at 8:22
    
Can you try with mount option sec=ntlm or sec=ntlmi or sec=ntlmv2 or sec=ntlmv2i or sec=ntlmssp or sec=ntlmsspi –  Rahul Patil Apr 10 '13 at 8:37
show 1 more comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.