"user” CIFS mounts not supported”. / fix mount permissions


I have on my fstab

//IP/samba /home/this/samba cifs noauto,x-systemd.automount,x-systemd.mount-timeout=30,_netdev,credentials=/home/this/.smbcredentials,iocharset=utf8 0 0

It used to work fine for Fedora. It still works for Manjaro and Void.
Now, when I try to reach the directory, it is empty.
If I try to mount with Dolphin or on terminal. I get the "user” CIFS mounts not supported”.

I can access the files if I just type smb://IP/samba

I found out here that people had a similar problem: https://discussion.fedoraproject.org/t/suddenly-user-cifs-mounts-not-supported/22785

I followed their steps:

sudo chmod u+s /bin/mount
sudo chmod u+s /bin/umount
sudo chmod u+s /usr/sbin/mount.cifs

But that just changed the problem to:
Mount.cifs: permission denied

the system responded: Couldn't chdir to /home/this/samba: No such device after a reboot

I have two questions:

  1. Currently, are there any way to fix the samba partition on Fedora?
  2. What are the default permissions of mount, umount and mount.cifs for Fedora? As it just changed the error, I feel like I should change them back, but I cannot figure out the proper one.

I appreciated any pointers to the right direction.

Thank you

The default permissions on those 3 files are here, on both my f36 and f35 machines.

$ ls -l /usr/bin/mount /usr/bin/umount /usr/sbin/mount.cifs
-rwsr-xr-x. 1 root root 49048 Feb 14 05:21 /usr/bin/mount
-rwsr-xr-x. 1 root root 36680 Feb 14 05:21 /usr/bin/umount
-rwxr-xr-x. 1 root root 53992 Apr 30 12:53 /usr/sbin/mount.cifs


# ls -l /usr/bin/mount /usr/bin/umount /usr/sbin/mount.*
-rwsr-xr-x. 1 root root  49240 Jun  1 07:52 /usr/bin/mount
-rwsr-xr-x. 1 root root  36888 Jun  1 07:52 /usr/bin/umount
-rwxr-xr-x. 1 root root  54176 Apr 30 12:48 /usr/sbin/mount.cifs

I noted that someone mentioned that doing sudo chmod u+s /usr/sbin/mount.cifs worked for them, but cannot test as I have nothing to mount that way.

1 Like

thanks, mine looks similar

❯ ls -l /usr/bin/mount /usr/bin/umount /usr/sbin/mount.cifs
-rwsr-xr-x 1 root root 49240 Jun  1 06:52 /usr/bin/mount
-rwsr-xr-x 1 root root 36888 Jun  1 06:52 /usr/bin/umount
-rwsr-xr-x 1 root root 54176 Apr 30 11:48 /usr/sbin/mount.cifs

Not sure what chmod u+s changed as I never used that before.

man chmod

       chmod clears the set-group-ID bit of a regular file if the file's group ID does  not  match  the  user's  effective
       group  ID or one of the user's supplementary group IDs, unless the user has appropriate privileges.  Additional re‐
       strictions may cause the set-user-ID and set-group-ID bits of MODE or RFILE to be ignored.  This  behavior  depends
       on  the  policy  and functionality of the underlying chmod system call.  When in doubt, check the underlying system

       For directories chmod preserves set-user-ID and set-group-ID bits unless you explicitly specify otherwise.  You can
       set  or  clear  the  bits with symbolic modes like u+s and g-s.  To clear these bits for directories with a numeric
       mode requires an additional leading zero, or leading = like 00755 , or =755

Yours above, mine below.
Note the difference.

Resetting yours to match the default can be done with
sudo chmod 755 /usr/sbin/mount.cifs

The command “chmod u+s ” adds the suid bit to the permissions on that file.

1 Like

Please have a look to these bug reports

It looks like a new kernel version has been released that it is supposed to solve some issues with Samba.

Thanks @computersavvy, I fixed that and went back to the original problem.

Thanks @alciregi, I am trying to update for the new Kernel but there are some conflicts.

I guess those are the solutions (The file system permissions and wait for them to fix the Kernel).

Thank you all. Cheers.

1 Like