mount.cifs issue opensuse 11.4

Hi all,

I’m not sure this is the right location for this thread but I experience mount problems with my SMB share at home after updating to 11.4 from 11.2.

Any help is greatly appreciated.

Issue:

fire@a3800:~> mount ~/Server/fire
Couldn't chdir to /home/fire/Server/fire: Permission denied

fstab line:

//192.168.0.20/fire  /home/fire/Server/fire    cifs noauto,user           0 0

I can do this as user because the “UID” from “mount.cifs” is set:

fire@a3800:/sbin> ls -l
-rwsr-xr-x 1 root root      36504 19 feb 06:36 mount.cifs

This has always been working for me in all opensuse versions 10.0 till 11.3. (yes, my desktop is still on 11.3)
With 11.4 on my laptop I can’t mount my share anymore. Also root can’t mount the share!

a3800:~ # whoami
root
a3800:~ # mount /home/fire/Server/fire
Password: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
a3800:~ # 

The password is asked but no joy…

Other commands are tried with the same result:

fire@a3800:/~> whoami
fire
fire@a3800:/~> /sbin/mount.cifs //192.168.0.20/fire  /home/fire/Server/fire -o user=fire,domain=home,uid=fire,gid=users                              
Couldn't chdir to /home/fire/Server/fire: Permission denied    

or:

a3800:~ # whoami
root
a3800:~ # mount /home/fire/Server/fire
Password: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
a3800:~ # mount.cifs //192.168.0.20/fire  /home/fire/Server/fire -o user=fire,domain=home,uid=fire,gid=users
Password: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
a3800:~ # mount //192.168.0.20/fire  /home/fire/Server/fire -o user=fire,domain=home,uid=fire,gid=users                                            
Password: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)                                                                                                 
a3800:~ #

Info:

a3800:~ # mount.cifs -V
mount.cifs version: 4.6
a3800:~ # uname -a
Linux a3800.home 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux
a3800:~ # cat /etc/SuSE-release
openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon
a3800:~ # 

Thanks for reading, Fire

Couldn’t chdir to /home/fire/Server/fire: Permission denied

Might be strange permissions somewhere along the dir tree.
What are the permissions on Server and fire as displayed by this command:

sudo ls -l /home/fire | grep Server; sudo ls -l /home/fire/Server | grep fire

It might be because I kept my home partition from the previous opensuse…

fire@a3800:~> sudo ls -l /home/fire | grep Server; sudo ls -l /home/fire/Server | grep fire
root's password:
drwxr-xr-x 5 fire users 4096 12 mrt 17:39 Server
drwxr-xr-x 2 fire users 4096 12 mrt 17:38 playonhd
drwx------ 2 fire users 4096 19 dec  2007 public
drwx------ 2 fire users 4096  5 feb  2008 fire

Hopefully you see something wrong here…

Thanks swerdna,

Changing the permission did the trick.

I had to set “read” and “open” for “group” and “other” on the “fire” folder

fire@a3800:~> mount ~/Server/fire
Password: 

works!

umount not… umount.cifs does not exist anymore. Should I make a link to mount.cifs? As root it does work!

fire@a3800:~> umount ~/Server/fire
umount: aankoppeling op /home/fire/Server/fire komt niet overeen met fstab
fire@a3800:~> sudo umount ~/Server/fire
fire@a3800:~> 

Congrats – be well

Sorry to say but it ain’t solved, As user I can mount the share but only “root” can umount the share. (unmount)

I see the error message above is in Dutch, here is the translation:

umount: /home/fire/Server/fire mount disagrees with the fstab

As superuser I do not get this error and it will unmount, but this is not acceptable for me.
Something has changed and I am not seeing it. The permission thing is also strange…

The unmount issue for users can be solved “temporally” by replacing the @mtab symlink by a real mtab file in /etc.
Temporally because after a reboot the symlink (and the issue) is back again. :expressionless:

Any help is appreciated.

I’m also having a similar issue after upgrading 11.3 to 11.4, see:
Mounting network-shared drives fails when upgrading to 11.4

@Fire11, there’s a bit of a Samba bug regarding the snb daemon, so just check that it’s running with this command: “sudo /usr/sbin/rcsmb status”
(I don’t think it’s an issue here, but, hmmm, might as well check)

Well “rcsmb” is not running after boot…and also after mounting my shares… But remember, it should only run the smb-client on this box…

fire@a3800:~> sudo /usr/sbin/rcsmb status
root's password:
Checking for Samba SMB daemon                                                               unused

On Tue March 15 2011 01:36 pm, Fire11 wrote:

>
> Well “rcsmb” is not running after boot…and also after mounting my
> shares… But remember, it should only run the smb-client on this box…
> Code:
> --------------------
> fire@a3800:~> sudo /usr/sbin/rcsmb status
> root’s password:
> Checking for Samba SMB daemon
unused
> --------------------
>
>
Fire11;

Try disabling apparmor. There seems to have been a regression in the apparmor
profiles and this may be biting you. You might also check that the smb/cifs
service is set to start at boot. In ll.2 it was still called smbfs but this
may have changed to something like cifs as smbfs is obsolete.

There are no guarantees here as I’ve not yet installed 11.4.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

If smbd is off, then Samba client is off too. Here’s the bug report, I think it’s diagnosed now and the fix is on its way, but it’s not here yet, so disable AppArmorr until the update arrives: https://bugzilla.novell.com/show_bug.cgi?id=666450

I don’t know if that’s causing your issue, but it’s a strong candidate.

Also, goto Yast → System → Runlevels → cifs and toggle it to “on” [see the 11.4 release notes, this too has changed from 11.3]. I think this cifs daemon is a bit of a dud when it comes to entries in fstab, likely it works for entries in smbfstab, but I’m not clear on that, havent tested it myself.

Okay I write the results down as I execute them. Note; the shares are mounted and after every step I try to unmount them.

Toggle “cifs” on (it was off)
> result, unmount not possible by user

Turn off apparmor
> result, unmount not possible by user

Start rcsmb

fire@a3800:/etc> sudo /usr/sbin/rcsmb start
root's password:
Starting Samba SMB daemon                                                                   done
fire@a3800:/etc> sudo /usr/sbin/rcsmb status
Checking for Samba SMB daemon                                                               running

> result, unmount not possible by user

(I have to reboot an come back in a moment, the laptop is heating up fast. The fan is not working after it went to sleep… :O)

Al settings have “survived” the reboot except “rcsmb”.

fire@a3800:~> sudo /usr/sbin/rcsmb status
root's password:
Checking for Samba SMB daemon                                                               unused
fire@a3800:~> sudo /usr/sbin/rcsmb start
Starting Samba SMB daemon                                                                   done
fire@a3800:~> sudo /usr/sbin/rcsmb status
Checking for Samba SMB daemon                                                               running
fire@a3800:~> umount ~/Server/public
umount: /home/fire/Server/public mount disagrees with the fstab

Result > user still can’t unmount.

It was worth to try but the problem lies elsewhere. I already stated that there is the change of /etc/mtab in openSUSE 11.4. It’s is not a file anymore but a symbolic link to /proc/self/mounts and according to other fora this gave the same issue in the past. (and still is…)

I can positive confirm this. If the link is replaced by an empty file and you mount a share, than the share is written to the file. Unmounting the share (as user) does work with the “real” mtab. After reboot this change is gone but it is no real solution anyway…

Found this info in the mount manpage…

It is possible to replace /etc/mtab by a symbolic link to /proc/mounts, and especially when you have very large numbers of mounts things will be much faster with that symlink, but some information is lost that way, and in particular using the “user” option will fail.

Don’t forget to set rcnmb and rcsmb to on in Yast → System → Runlevels

All I can suggest now is a bug report.

I forgot about “rcnmb” and set it by commandline. (“rcnmb” and “rcsmb” are not available in Yast → System → Runlevels.) But again, no joy.

So, perhaps it is a bug or just me using the commands wrong. I am no programmer and not sure how to report a bug or check if it is already reported…I go and figure it out…

Thanks for the support so far, it is greatly appreciated!

I was unclear: In Yast’s runlevels GUI, set nmb and smb to on. This will cause the daemons to switch on at boot time.

I placed the “bug” at bugzilla=679949
From the first reaction it seems to be an issue in cifs.utils v4.6

@swerdna, I enabled smb and nmb the right way, but it does not change the unmounting as user issue.