-   Linux - Networking (
-   -   Cifs "mount error 13 = Permission denied" CIFS SUCKS (

humbletech99 07-12-2006 08:07 AM

Cifs "mount error 13 = Permission denied" CIFS SUCKS
I am getting sick and tired of this so called Smbfs replacement "Cifs". I have yet another error trying to mount a share on a Windows XP Pro machine. I get an error saying "Permission denied" despite entering the right credentials:

mount -t cifs //hostname/share /mnt/temp -o username=someuser,password=somepassword
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page ( mount.cifs)

I use these same credentials from another Windows machine to access that share and they work fine so instead I go back to linux and do

mount -t smbfs //hostname/share /mnt/temp -o username=someuser,password=somepassword
and the share mounts successfully and I can use it, the EXACT same credentials, I just pressed up and replaced cifs with smbfs....

This is on top of other mysterious errors like "Resource temporarily unavailable" and "Input/output error" that also often occur.
and )

Both of these also stop the share from being mounted when encountered. In both cases I also repeated the command by pressing up and replacing the word cifs with smbfs. Smbfs succeeds where Cifs failed and I can start using the share.

mount -t smbfs //hostname/share /mnt/temp -o username=someuser,password=somepassword
These errors all occur against various SMB server ranging from both new and old Samba servers on various distributions of Linux, to Windows 2000 and XP workstations, so the remote machines can't be to blame when smbfs works at the same time.


anybody else have any experiences of CIFS or any suggestions?

kstan 07-12-2006 11:27 AM

i using cifs to mount win2k3, it running well. I'd make some script to auto mount the partition, so far there is no any problem.
Are you work in domain environment? Probably you need to try DOMAIN\User?
And, you can try to user option 'creadential', then make a file to store username and password.

example files '.mountparameter'


*Please check whitespace, I have problem with the whitespace before.


humbletech99 07-12-2006 07:12 PM

actually I am using a credentials file (without spaces), I just didn't mention it in case other people don't know about it or how to use it properly, that works fine for me across all systems, I've also passed a username and password combination instead of it for extra testing to make sure it is right and that the credentials supplied were correct.

the username and password I have been using is the local administrator which normally works fine. I've also used a domain administrator account which I know also works from other machines like windows workstations, but again I have the same results with cifs when it doesn't work for certain machines that have no apparent common features, various windows systems and various linux distros of various ages/samba packages.

The only conclusion I can draw is that it is Cifs' fault...

kstan 07-12-2006 10:42 PM

err.. I have 1 experience don't know whether you same with me.

Please make sure you mount into exactly share folder but not child of the share folder. Meaning that:-
- you have win2k3 share folder \\windows\share
- you want to access \\windows\share\data
- you only can mount //windows/share but not //windws/share/data, it will return you error.

the soulution is something like:-
-mount //windows/share mountpoint
-ln -s mountpoint/data /home/user1/Desktop/data


humbletech99 07-13-2006 05:19 AM

no, I am trying to mount the actual share not the subfolder as you can see from the fact that mounting with smbfs works so the line is correct, the only difference I made was the -t cifs became -t smbfs and it worked, showing that the problem lies with cifs.

kstan 07-13-2006 05:28 AM


Sorry to inform that I really wonder that are you using the windows server or linux server to share cifs?
If you are using win2k3 then we will carry on(Because I'd success and use untill now), if you using samba3 then I'd never try to mount samba cifs share then I'll keep quiet. :)


humbletech99 07-18-2006 04:38 AM

I'm mounting various shares on various samba versions as well as 2000 & XP workstations and 2000 && 2003 servers.

I've got another error here now with cifs!


mount error 20 = Not a directory
Refer to the mount.cifs(8) manual page ( mount.cifs)

But the mount point is a dirctory! I can mount another share via cifs on the same mount point!!!!!

I could make a collection of these...

kstan 07-19-2006 02:25 AM


probably you need to list out your the problem server's share folder, where you want to mount the folder, what folder you want to mount. the version of your windows, samba and which distro you use? I'd successfully mount properly with fedora 3/4/5 and suse 9.3/10.
then, what server you test to? samba or windows xp's share folder??
what command you test in each server.

By the way, did you recompile your kernel, samba? and what is the version of your kernel? update patches of your kernel?


Matrixx 09-16-2006 09:26 PM

Yes and No....
I had the same issue if I entered:
mount -t cifs //hostname/share /mnt/temp -o username=someuser,password=somepassword

But if I entered:
mount.cifs //hostname/share /mnt/temp -o username=someuser,password=somepassword

It works... what is up with that?

It does seem to be an issue with cifs and different Windows systems. W2K3 both work fine but the first one has an issue with Windows XP (for me). The systems are in a domain/forest infrastructure.

humbletech99 09-17-2006 10:45 AM

Matrixx: I've had these problems with one XP Sp2 machine and various samba machines on various distros of various ages. I suspect that some of this is actually just because older versions of samba don't support cifs and therefore I get funny errors if I try, but the Windows system is up to date and there isn't a good explanation for that, especially when it works for many other machines of the exact same OS version.

kstan: the commands, folders, share names etc are in the original posting. The versions of Linux are all different, 2.4 and 2.6 kernels included, OSs both Windows and Linux. I've used both 2.6.15 and 2.6.17 kernels on the box trying to mount the shares (ie the box I've done the above commands on), self compiled with SMBFS and CIFS both compiled directly into the kernel. The kernel is pretty new so I'd say it's reasonably up to date.

Mayne 01-06-2007 01:22 PM


Originally Posted by Matrixx
I had the same issue if I entered:
mount -t cifs //hostname/share /mnt/temp -o username=someuser,password=somepassword
But if I entered:
mount.cifs //hostname/share /mnt/temp -o username=someuser,password=somepassword
It works... what is up with that?

I had authentication errors when switching from smbfs to cifs (but using a credentials file). Using mount -v it turned out that cifs, in contrast to smbfs, does not ignore spaces surrounding the equal sign in the credentials file (thus, "username = jack" lead to the user " jack" using cifs).

humbletech99 01-06-2007 01:26 PM

there are no spaces in my creds file.

mastfaraz 03-15-2007 07:55 AM

mount error 13 = Permission Denied (your mistake in the mounting Statement)

Most of people got this Permission Denied access when mounting a
Windows Shared folder

following mounting ->

usually : mount -t cifs //<MachineName>/<Shared Folder> /mnt/Shared -o username=<username>,password=<password>
give you error 13.

correct : mount -t cifs //<MachineName>/<SharedFolder> /mnt/Shared -o username=<DomainName>/<username>,password=<password>

Yes! the only deference is "domain name:<DomainName>" is missing. In case of No Domain try to put your <MachineName> there.
cifs does not locate domain itself (I guess).

This is my first Post on web. :)

kstan 03-15-2007 08:13 AM

1st post? This is a good try! Many people is waiting your help..

Good luck :)

humbletech99 03-15-2007 08:38 AM

actually, you know what, I take it all back, cifs is way way way better than smbfs.

smbfs doesn't complain because it silently fails in many cases. This is worse, because you then find out that what you were doing hasn't worked.

I can't remember the original problem on this, but as far as I can tell, this is solved now. I think that the original problem was either something like smb signing/encryption or me not actually having the perms to access the windows share after locking it down.

Anyway, I don't have any probs at the moment on this.

All times are GMT -5. The time now is 09:12 PM.