Hello all.
I have my samba server on one system.
And I want to mount directory share define on it in another system.
And I have some issues.
> mount -t cifs //192.168.8.5/project /mnt/test/ -o username=tomek,nosuid,uid=tomek,gid=tomek
This program is not installed setuid root - "user" CIFS mounts not supported.
The solution on net is to
> chmod u+s /sbin/mount.cifs
chmod: changing permissions of '/sbin/mount.cifs': Read-only file system
but I am on Fedors Silverblue so along with immutable OS postulate I can not change permisions under /usr/sbin/.
I can mount it as a root, but this is not what I want - I want to be able to mount it as regular user.
What can I do ?
On my samba server I have
> ls -la /opt/project/
total 16
dr-xrwx---. 3 project project_developer 4096 Sep 15 11:55 .
drwxr-xr-x. 4 project project_developer 4096 Sep 5 19:57 ..
-r--rw----. 1 project project_developer 0 Sep 15 11:55 1
-r--rw----. 1 project project_developer 0 Sep 15 11:55 .2
dr-xrwx---. 3 project project_developer 4096 Sep 5 12:50 A
-r-xrwx---. 1 project project_developer 23 Sep 12 20:27 x
-r--rw----. 1 project project_developer 0 Sep 12 20:33 y
but after mounting it, every file has x permission:
> sudo mount -t cifs //192.168.8.5/project /mnt/test/ -o username=tomek,nosuid,uid=tomek,gid=tomek
> ls -la /mnt/test/
total 8
drwxr-xr-x 2 tomek tomek 0 Sep 15 11:55 .
drwxr-xr-x. 4 root root 4096 Sep 12 19:39 ..
-rwxr-xr-x. 1 tomek tomek 0 Sep 15 11:55 1
-rwxr-xr-x. 1 tomek tomek 0 Sep 15 11:55 .2
drwxr-xr-x 2 tomek tomek 0 Sep 5 12:50 A
-rwxr-xr-x 1 tomek tomek 23 Sep 12 20:27 x
-rwxr-xr-x. 1 tomek tomek 0 Sep 12 20:33 y
I want to preserve permissions from server.
In my smb.conf I have:
smb3 unix extensions = yes
# and even added
smb1 unix extensions = yes
(smb3 unix extensions are not well explained here: smb.conf in contrast to smb1 unix extensions), but as you see it does not work.
Also this is my share config:
> cat usershares.conf
[project]
comment = Project
path = /opt/project
read only = yes
browsable = yes
guest ok = no
valid users = tomek
force user = project
and also:
semanage fcontext --list | grep project
/opt/project(/.*)? all files system_u:object_r:samba_share_t:s0
/var/opt/project(/.*)? all files system_u:object_r:samba_share_t:s0
Anyone, please advice, help.