# Cifs "mount error 13 = Permission denied" CIFS SUCKS

## humbletech99

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 (e.g.man 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.

(see https://forums.gentoo.org/viewtopic-t-479469-highlight-.html

and https://forums.gentoo.org/viewtopic-t-473301-highlight-.html ) 

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.

CIFS SUCKS!

anybody else have any experiences of CIFS or any suggestions?

----------

## darkphader

works here

what version of cifs are you using?

Chris

----------

## humbletech99

no idea, I'm using a 2.6.15 kernel from gentoo-sources on x86. on an opteron server 

cifs works fine for a lot of machines, but when you're doing 50 machines, then you find that 15 of them are broken in a wide variety of ways across disparate systems, if appears as though cifs itself must be the problem.

----------

## darkphader

Either update to a newer kernel (2.6.17) or get the latest cifs version:

http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.42b.tar.gz to replace the files in the fs/cifs directory of the kernel and rebuild the module.

Also it's good to have the mount helpers mount.cifs and umount.cifs that come with Samba. If you don't use/want Samba emerged just manually compile the helper utilities from the latest Samba source (3.0.23 as of this writing).

Chris

----------

## humbletech99

I've got another error here now with cifs!

```
mount error 20 = Not a directory

Refer to the mount.cifs(8) manual page (e.g.man 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...

I am thinking of upgrading the kernel but it's already at 2.6.15-gentoo-r1 and the current gentoo kernel is only 2.6.16-gentoo-r12 so I doubt this will make any difference, although I may chew my words since I've just diffed every file against it's counterpart (I love bash) and there are a bunch of changes...

so I'll give it a try and see if it helps...

----------

## humbletech99

running a 2.6.17-r4 kernel from gentoo-sources hasn't helped. How annoying. I had to write a script to try to mount via cifs, catch the output and test it and if it got an input output error then try smbfs instead (which works). Not a good workaround for something that should just work. I thought the whole point of a protocol was to make sure both ends know how to communicate properly, so why can't smbmount on one machine talk to samba on another?!

----------

## Diezel

I had the same problem when I forgot to merge Samba, didn't have to configure it, only merge it. But that's probably not your problem. Cifs has worked flawlessly both at home and at work though. We use it every linux desktop and never had any problems with it.

----------

## humbletech99

ok, I am mounting on gentoo with the previously mentioned 2.6.17 kernel and am accessing a varitey of hosts and getting this error.

In fact it occurs more on samba that on Windows! Probably because it's occurring for older version of samba. Here are the systems:

Red Hat Linux release 6.1 (Cartman)    with samba-2.0.6-7

SuSE Linux 9.0 (i586)                          with samba-2.2.8a-107

SuSE Linux 9.1 (x86-64)                      with samba-3.0.9-2.6

Those 3 hosts get Input/Output error and fail to mount, but smbfs mounts fine. I recon this might be to do with the age of those samba installations... they probably don't support cifs properly in those versions, if at all.

One Windows XP SP2 machines gives a permission denied error, even though the exact same credentials work when done with smbfs.

I do have samba installed and working on the gentoo machine I am trying to mount -t cifs from, in fact I have a good setup on that particular machine, with lots of shares.

----------

