Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
2946 views
Try to mount SMB share on NAS and get "Operation not supported"
I have several Synology NAS, running DSM 6.2.2-24922 Update 5, which I successfully mount on Ubuntu 18.04 with: sudo mount -t cifs //192.168.x.y/folder_name -o username=user,password=???????,uid=1000,sec=ntlm,vers=1.0 /local_mount_point I have bought a new one, which is running DSM 6.2.4-25556. I at...
I have several Synology NAS, running DSM 6.2.2-24922 Update 5, which I successfully mount on Ubuntu 18.04 with: sudo mount -t cifs //192.168.x.y/folder_name -o username=user,password=???????,uid=1000,sec=ntlm,vers=1.0 /local_mount_point I have bought a new one, which is running DSM 6.2.4-25556. I attempt to mount in the same way and I get this error: mount: /local_mount_point: mount(2) system call failed: Operation not supported. EDIT I removed the vers=1.0, and the error changed to //192.168.x.y/folder_name does not exist Enable SMB Share is enabled on the new NAS, with the same settings as the others. My smb.conf on the new NAS is: [global] printcap name=cups winbind enum groups=yes include=/var/tmp/nginx/smb.netbios.aliases.conf min protocol=SMB2 security=user local master=no realm=* passdb backend=smbpasswd printing=cups max protocol=SMB3 winbind enum users=yes load printers=yes workgroup=WORKGROUP And my smb.share.conf is: [folder_name] recycle bin admin only=yes ftp disable modify=no ftp disable download=no write list=nobody,nobody browseable=yes mediaindex=no hide unreadable=no win share=yes enable recycle bin=yes invalid users=nobody,nobody read list=nobody,nobody ftp disable list=no edit synoacl=yes valid users=nobody,nobody writeable=yes guest ok=yes path=/volume2/folder_name_1 skip smb perm=yes comment="" [folder_name_2] recycle bin admin only=yes ftp disable modify=no ftp disable download=no write list=nobody,nobody browseable=yes mediaindex=no hide unreadable=no win share=yes enable recycle bin=yes invalid users=nobody,nobody read list=nobody,nobody ftp disable list=no edit synoacl=yes valid users=nobody,nobody writeable=yes guest ok=yes path=/volume1/folder_name_2 skip smb perm=yes comment="" (For interest, the smb.conf on one of the NAS which are working is: [global] printcap name=cups winbind enum groups=yes include=/var/tmp/nginx/smb.netbios.aliases.conf security=user local master=no realm=* passdb backend=smbpasswd printing=cups max protocol=SMB2 winbind enum users=yes load printers=yes workgroup=WORKGROUP ) Can anyone advise?
Omroth (153 rep)
Jul 5, 2021, 03:08 PM • Last activity: Jun 18, 2025, 01:02 PM
1 votes
0 answers
748 views
Using server-side copy on a SMB share
According to the [SMB docs][1] server-side copy should work on recent versions of SMB via `cp --reflink` When trying this with a server running smbd 4.15 (via [crazy-max/docker-samba][2]) and a share mounted with `mount -t cifs -o uid=1000,gid=1000,vers=3.1.1 //host/share/ /share`, I always get `Ope...
According to the SMB docs server-side copy should work on recent versions of SMB via cp --reflink When trying this with a server running smbd 4.15 (via crazy-max/docker-samba ) and a share mounted with mount -t cifs -o uid=1000,gid=1000,vers=3.1.1 //host/share/ /share, I always get Operation not supported for cp --reflink /share/test /share/test2. The versions on the client machine are:
~$ mount.cifs --version
mount.cifs version: 6.9
~$ uname -r
5.4.0-125-generic
Why is it not working? Any ideas? Thanks!
frsc (111 rep)
Aug 30, 2022, 02:17 PM • Last activity: Jun 16, 2025, 03:30 PM
2 votes
1 answers
2641 views
Edit samba user password hash/digest without knowing the password
I am maintaining a samba server for an office environment. So far, whenever there had to be a new user, I called the person over and let him type in his samba password on my console, after I typed `smbpasswd -a username`. I don't want to know any of the passwords. For the unix passwords, I just let...
I am maintaining a samba server for an office environment. So far, whenever there had to be a new user, I called the person over and let him type in his samba password on my console, after I typed smbpasswd -a username. I don't want to know any of the passwords. For the unix passwords, I just let them create a password digest (e.g. http://www.askapache.com/online-tools/htpasswd-generator/) in advance and edit the password file later with vipw -s. Now I have a remote colleague who can't come over to type in his password, but I still don't want to know it at all. How can I edit the samba password without actually knowing the password itself, but just a digest?
Preexo (5083 rep)
May 28, 2015, 05:29 AM • Last activity: Jun 1, 2025, 12:07 PM
0 votes
0 answers
81 views
unable to login to samba share
I want to share my data on my Rocky 9 server to family members using windows PCs. I setup and config samba. Seems something is missing. Users are not able to login. They are trying their unix credentials. I want files created/owned by each user to have their name/id as owner (ls -l) and I also want...
I want to share my data on my Rocky 9 server to family members using windows PCs. I setup and config samba. Seems something is missing. Users are not able to login. They are trying their unix credentials. I want files created/owned by each user to have their name/id as owner (ls -l) and I also want users to have two folders to save files to: 1. Their home folder (/home/) and 2. to the shared folder. another smaller issue is: Even though we have changed workgroup names on our PC to mywg it still does not show in network browse. We have to list share by samba-server-IP address. PCs tested on: win 10 here is the config: dnf install samba samba-common -y systemctl enable smb nmb systemctl start smb nmb firewall-cmd --permanent --zone=public --add-service=samba firewall-cmd --reload test shows ok: # testparm Load smb config files from /etc/samba/smb.conf Loaded services file OK. Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback) Server role: ROLE_STANDALONE Press enter to see a dump of your service definitions # Global parameters [global] map to guest = Bad User printcap name = cups security = USER server string = Samba Server %v workgroup = mywg idmap config * : backend = tdb cups options = raw [homes] browseable = No comment = Home Directories inherit acls = Yes read only = No valid users = %S %D%w%S [printers] browseable = No comment = All Printers create mask = 0600 path = /var/tmp printable = Yes [print$] comment = Printer Drivers create mask = 0664 directory mask = 0775 force group = @printadmin path = /var/lib/samba/drivers write list = @printadmin root [all_data] comment = All of our data path = /mystuff/mydata read only = No valid users = @family this is what we get: enter image description here Thanks for the help. So as on that link. I set the samba password for all family members. I think that also creates a 'samba' user somewhere in the system. But, now i get different error: enter image description here The permissions to the share are: drwxr-xr-x. 4 root root 4096 May 3 23:48 /mystuff drwxrwxrwx. 15 root root 4096 May 24 20:46 /mystuff/mydata/ files under this are all owned by one unix user. with permissions as 755 (on folders) and 644 on files.
Rajeev (256 rep)
May 25, 2025, 02:13 PM • Last activity: May 26, 2025, 02:12 PM
4 votes
3 answers
406 views
Why does the output of testparm differ from /etc/samba/smb.conf?
This is the output of the `[global]` section of the /etc/samba/smb.conf of a random Synology NAS: ~# cat /etc/samba/smb.conf [global] printcap name=cups winbind enum groups=yes include=/var/tmp/nginx/smb.netbios.aliases.conf min protocol=NT1 security=user local master=no realm=* passdb backend=smbpa...
This is the output of the [global] section of the /etc/samba/smb.conf of a random Synology NAS: ~# cat /etc/samba/smb.conf [global] printcap name=cups winbind enum groups=yes include=/var/tmp/nginx/smb.netbios.aliases.conf min protocol=NT1 security=user local master=no realm=* passdb backend=smbpasswd printing=cups max protocol=SMB3 winbind enum users=yes load printers=yes workgroup=WORKGROUP And this is the output of testparm, which is not identical although it says it loaded this configuration file: # testparm -s Load smb config files from /etc/samba/smb.conf ... [global] passdb backend = smbpasswd printcap name = cups realm = * security = USER server min protocol = NT1 syno catia = Yes winbind enum groups = Yes winbind enum users = Yes winbind expand groups = 1 notify:synotify = yes rpc_server:msftewds = embedded rpc_daemon:wspd = disabled fruit:locking = none rpc_server:mdssvc = embedded rpc_daemon:mdssd = disabled idmap config * : backend = syno include = /var/tmp/nginx/smb.netbios.aliases.conf smb encrypt = if_required strict sync = No I know testparm has this option: -v, --verbose Show default options too This explains for example that it does not return max protocol=SMB3, because it is already the default: # testparm -s -v 2>&1 | grep "max protocol" client ipc max protocol = default client max protocol = default server max protocol = SMB3 But why for example does testparm return the values starting with rpc_ or the line fruit:locking = none. It is not set in the smb.conf. And I can't find it in any other file in /etc, too: # grep -rIils fruit /etc # I mean, yes there is a setting in the GUI which seems to enable the vfs module "fruit", but why isn't it mentioned in any Samba Config file? Synology Advanced Samba Settings
mgutt (547 rep)
Feb 4, 2023, 10:23 AM • Last activity: May 19, 2025, 11:32 AM
3 votes
2 answers
30314 views
How to make this Samba share accessible without any user/password login?
I have modified `/etc/samba/smb.conf` to create a `[public]` share: ``` [global] workgroup = WORKGROUP log file = /var/log/samba/log.%m max log size = 1000 logging = file panic action = /usr/share/samba/panic-action %d server role = standalone server obey pam restrictions = yes unix password sync =...
I have modified /etc/samba/smb.conf to create a [public] share:
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[public]
comment = Public Storage
path = /home/share
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no
and then I did:
sudo /etc/init.d/smbd restart
sudo smbpasswd -a pi  # enter a password here
Unfortunately, when I access this shared folder from Windows, I need to enter a user/password login (see screenshot below). **Question: how to make this Samba share accessible without any user/password login?** enter image description here ___ PS: I created/mounted the shared folder like this:
sudo mkdir /home/share
sudo chown -R root:users /home/share
sudo chmod -R ug=rwx,o=rx /home/share
sudo mount /dev/sda1 /home/share
Basj (2579 rep)
Nov 11, 2020, 06:11 PM • Last activity: May 18, 2025, 03:16 PM
0 votes
2 answers
70 views
rsync to SAMBA share permission denied
I have a NAS that exports some directories as SAMBA shares. It works normally very well. Now I have mounted this particular share on a Linux box, using `fstab`. This also works. However, I would like to use `rsync` to download files from a server and synchronize two directories. However, I get from...
I have a NAS that exports some directories as SAMBA shares. It works normally very well. Now I have mounted this particular share on a Linux box, using fstab. This also works. However, I would like to use rsync to download files from a server and synchronize two directories. However, I get from rsync the error message rsync: [receiver] failed to set times on "": Operation not permitted (1) so for some weird reason, he cannot set the file time. I know I can "fix" this error with the --no-times but then, the file times are not copied accordingly and, therefore, are wrong. Also it will then, I guess, cause problems with the next sync. For this reason I would like to have the times correctly set. Funny enough, if I run the same rsync command as root, setting the file times works! but it does not when it is run under another user. rsync -avz --no-perms --no-owner --no-group --no-perms --no-times --password-file ~/passwordfile.txt so it is not technically a problem of the SAMBA server, but it seems more like it is a restriction of the permissions. However, my SAMBA share is mounted with the following options cifs vers=3,rw,uid=root,gid=transfer,file_mode=0666,dir_mode=0777,credentials=/etc/my_credentials.txt so even though the owner of each file and directory is root, everybody has R/W access and therefore, in my understanding, setting the file times should work. So I don't understand why it does not work when not run as root. What is the proper fix of this?
T. Pluess (626 rep)
May 14, 2025, 05:47 AM • Last activity: May 16, 2025, 09:29 AM
4 votes
3 answers
13931 views
cifs mount error(2): No such file or directory
I have a Buffalo Neworkstorage (NS) installed. I am able to mount the NS from my Rock Pi N10 running Debian (buster) using the following command: sudo mount.cifs // >/SHARE /mnt/lspro But on my PC running Ubuntu 18.04, using the exactly the same command as above, I got an error: mount error(2): No s...
I have a Buffalo Neworkstorage (NS) installed. I am able to mount the NS from my Rock Pi N10 running Debian (buster) using the following command: sudo mount.cifs //>/SHARE /mnt/lspro But on my PC running Ubuntu 18.04, using the exactly the same command as above, I got an error: mount error(2): No such file or directory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) The dmesg logs are: [48381.426142] CIFS: Attempting to mount //10.1.10.77/share [48381.426168] No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old servers which do not support SMB3 (or SMB2.1) specify vers=1.0 on mount. [48381.440240] CIFS VFS: cifs_mount failed w/return code = -2 /mnt/lspro exists on the Ubuntu box. I can cd /mnt/lspro and ls /mnt/lspro it's confirmed it there! I can even mount the NS through Files other location by "smb://" using Anonymous without password, but I cannot mount.cifs in the Ubuntu box. Does anyone have the same situation and found a solution?
paul (61 rep)
Apr 16, 2021, 04:18 AM • Last activity: May 15, 2025, 11:56 AM
3 votes
1 answers
10271 views
In OpenMediaVault, how do I secure an SMB share with login and password?
I'm running a NAS server with https://www.openmediavault.org/ on a Raspberry PI. I've made a "shared folder", activated SMB sharing and within it created a share for this folder with "only guests" mode. I can use the share over the network. But now I want to secure it with a login/password instead o...
I'm running a NAS server with https://www.openmediavault.org/ on a Raspberry PI. I've made a "shared folder", activated SMB sharing and within it created a share for this folder with "only guests" mode. I can use the share over the network. But now I want to secure it with a login/password instead of "only guests" and I'm a bit overwhelmed. How do I make sure my share needs credentials for access (read/write)?
Ivan Koshelev (131 rep)
Jun 4, 2020, 09:04 PM • Last activity: May 5, 2025, 04:08 AM
0 votes
1 answers
107 views
x-systemd.automount and noauto causes CIFS mount to ignore uid/gid and mount as root
I'm trying to mount a CIFS (Samba) share using /etc/fstab, and I want it to be owned by a specific user (myuser), not root. My current fstab line is: # //server/share /mnt/share cifs credentials=/home/myuser/.smbcred,uid=myuser,gid=myuser,noauto,x-systemd.automount 0 0 However, when I include x-syst...
I'm trying to mount a CIFS (Samba) share using /etc/fstab, and I want it to be owned by a specific user (myuser), not root. My current fstab line is: # //server/share /mnt/share cifs credentials=/home/myuser/.smbcred,uid=myuser,gid=myuser,noauto,x-systemd.automount 0 0 However, when I include x-systemd.automount and noauto, the mount happens as root, and the uid/gid options appear to be ignored. Here's what I see after accessing the mount point: $ ls -lah /mnt/share drwxrwx--- 1 root root 0 ... -rw-rw---- 1 root root ... But if I remove x-systemd.automount and noauto and mount the share mount manually, the ownership is correct: $ ls -lah /mnt/share drwxrwx--- 1 myuser myuser 0 ... -rw-rw---- 1 myuser myuser ... So it seems that using x-systemd.automount causes the mount to be performed by root, ignoring uid and gid. Is this expected behavior? Is there a way to use automounting and still preserve the correct ownership? I'm on the regular 6.14.4-arch1-1 kernel with systemd and cifs-utils.
NLion74 (1 rep)
May 4, 2025, 04:30 PM • Last activity: May 4, 2025, 06:09 PM
3 votes
1 answers
4704 views
Utilizing Samba Shares Without using Winbind
I am curious if it is possible to use samba shares without using winbind. In our current environment we are using SSSD, Kerberos, and Samba to complete the required tasks such as joining the windows domain and setting up active directory. Since we are using SSSD instead of winbind how can we setup a...
I am curious if it is possible to use samba shares without using winbind. In our current environment we are using SSSD, Kerberos, and Samba to complete the required tasks such as joining the windows domain and setting up active directory. Since we are using SSSD instead of winbind how can we setup a samba share for the Windows machines to access using the current implementation? I can share some of the configuration as necessary. Using RedHat Enterprise 6 and Samba v 3.6.9
user2104891 (31 rep)
Nov 19, 2014, 03:23 AM • Last activity: Apr 26, 2025, 09:00 PM
3 votes
1 answers
2993 views
How do I speed up recovering "stuck" cifs mount?
I have a cifs mounted like this: mount.cifs -o uid=myuser,user=...,dom=... //IP/Share /some/mountpoint/ When I try to access it after period of inactivity (or when the network is inaccessible), it stucks application that for prolonged time (minutes). In the end it completes the request and unblocks...
I have a cifs mounted like this: mount.cifs -o uid=myuser,user=...,dom=... //IP/Share /some/mountpoint/ When I try to access it after period of inactivity (or when the network is inaccessible), it stucks application that for prolonged time (minutes). In the end it completes the request and unblocks the application. smbclient can easily log in and view directories, but the /some/mountpoint is waiting and waiting for minutes. How do I speedup these retries?
Vi. (5985 rep)
Jan 15, 2015, 01:38 PM • Last activity: Apr 17, 2025, 01:04 AM
-1 votes
1 answers
93 views
Access network Windows PC from Linux PC
I am working on a Fedora 41 machine. If I open the file browser and in the address bar type `sftp://some_user@some_linux_PC` it asks for `some_user`'s password and after that I can read and write files in the other Linux PC. I want to do the same but where the remote PC has Windows 11. Is this possi...
I am working on a Fedora 41 machine. If I open the file browser and in the address bar type sftp://some_user@some_linux_PC it asks for some_user's password and after that I can read and write files in the other Linux PC. I want to do the same but where the remote PC has Windows 11. Is this possible? How? As suggested [here](https://unix.stackexchange.com/a/283397/317682) , I tried smb://some_user@some_windows_PC but it does not work. I have samba installed. I am currently using Windows RDP with Remmina, but it's really unpleasant to work with a video-like connection, and it's hurting my eyes. Do I need to enable some settings in Windows first?
user171780 (286 rep)
Mar 27, 2025, 10:43 AM • Last activity: Mar 28, 2025, 03:09 AM
0 votes
0 answers
38 views
Can't mount samba-share but can connect via file explorer
TLDR: I can access an external harddrive via GUI tools but not via fstab / mount tooling. I'm at my wits end with this one. I've got an external harddrive plugged into the back of my Asus router, with samba share enabled. I can access the files on it from all of my devices, android, W10, Ubuntu, Mac...
TLDR: I can access an external harddrive via GUI tools but not via fstab / mount tooling. I'm at my wits end with this one. I've got an external harddrive plugged into the back of my Asus router, with samba share enabled. I can access the files on it from all of my devices, android, W10, Ubuntu, Mac. I can even access it on this device, again Ubuntu, accessing the files via Kodi and the file explorer. I've also been able to connect via the smbclient package. One oddity I did notice connecting via ubuntu's file explorer is the requirement for a domain in addition to the standard username and password. It wouldn't accept it blank so I just through an 'a' in there and it connected fine. However, I've burned a good few hours now attempting and failing to mount the drive for easier access and on-boot mounting. Unfortunately, of all the forum posts I've scraped, I'm seeing nothing new, no new tricks to try so I'm offering myself to the forum gods. I've edited the /etc/fstab file with the following, see image. They're all commented out but they have been uncommented one at a time and their are other permutations that I forgot to keep for the screenshot: enter image description here From there I've been running sudo mount -a I've received many different errors while debugging, mostly #22, but now its settled on #13 Tailing the kernel log with tail -f /var/log/kern.log I see: 2025-02-22T17:38:13.145098-05:00 nous kernel: CIFS: VFS: Use of the less secure dialect vers=1.0 is not recommended unless required for access to very old servers 2025-02-22T17:38:13.145100-05:00 nous kernel: CIFS: enabling forceuid mount option implicitly because uid= option is specified 2025-02-22T17:38:13.145101-05:00 nous kernel: CIFS: enabling forcegid mount option implicitly because gid= option is specified 2025-02-22T17:38:13.145102-05:00 nous kernel: CIFS: Attempting to mount //MY-ROUTERS-IP/photos 2025-02-22T17:38:13.168078-05:00 nous kernel: CIFS: VFS: cifs_mount failed w/return code = -13 Again, I can access the harddrive through the file explorer but can't mount it via the terminal. And for completeness a screenshot of the router's samba share settings: enter image description here Two posts that seemed the most relevant to my ametueurish eyes: https://unix.stackexchange.com/questions/643411/cant-mount-samba-share-cifs-mount-failed-w-return-code-13 https://unix.stackexchange.com/questions/489647/cant-connect-to-smb-shared-storage-from-ubuntu-18-04
Douglas G. Wright III (1 rep)
Feb 23, 2025, 01:52 PM
1 votes
1 answers
178 views
mount of smb share does work on Debian 11 but not on Debian 12 and uses wrong user
I have a kind of strange bug. I try to mount smb/cifs share of windows server 2019 as server using Debian as client. **The following *exact* command does work on Debian 11.11 but not on 12.9** with myuser as domain user: ````mount -v -t cifs "//host/Backup/myhost" /mnt/backup-myhost/ -o "username=my...
I have a kind of strange bug. I try to mount smb/cifs share of windows server 2019 as server using Debian as client. **The following *exact* command does work on Debian 11.11 but not on 12.9** with myuser as domain user:
mount -v -t cifs "//host/Backup/myhost" /mnt/backup-myhost/  -o "username=myuser,password=mypassword,domain=mydomain"
that gives on both the verbose output
mount.cifs kernel mount options: ip=1.2.3.4,unc=\\host\Backup,user=myuser,domain=mydomain,prefixpath=myhost,pass=*******
Debian 12.9 gives the additional error
mount error(13): Permission denied
I also tried several "sec" and "version" options. The permissions of /mnt/backup-myhost/ is 755 on both. **Windows server says the user "root" (sic!) tries to connect but mount uses "myuser".** Here is the last part of the output of dmesg of Debian 12.9 but I cannot see a cause even after comparing with Debian 11.11: ... [499614.187245] CIFS: fs/smb/client/transport.c: wait_for_free_credits: remove 1 credits total=0 [499614.187248] CIFS: fs/smb/client/transport.c: Sending smb: smb_len=372 [499614.188538] CIFS: fs/smb/client/connect.c: RFC1002 header 0x48 [499614.188542] CIFS: fs/smb/client/smb2misc.c: SMB2 data length 0 offset 0 [499614.188543] CIFS: fs/smb/client/smb2misc.c: SMB2 len 73 [499614.188545] CIFS: fs/smb/client/smb2ops.c: smb2_add_credits: added 1 credits total=1 [499614.188556] CIFS: fs/smb/client/transport.c: cifs_sync_mid_result: cmd=1 mid=2 state=64 [499614.188560] CIFS: Status code returned 0xc0000070 STATUS_INVALID_WORKSTATION [499614.188562] CIFS: fs/smb/client/smb2maperror.c: Mapping SMB2 status code 0xc0000070 to POSIX err -13 [499614.188563] CIFS: fs/smb/client/misc.c: Null buffer passed to cifs_small_buf_release [499614.188566] CIFS: VFS: \\host Send error in SessSetup = -13 [499614.188569] CIFS: fs/smb/client/connect.c: VFS: leaving cifs_get_smb_ses (xid = 111) rc = -13 [499614.188572] CIFS: fs/smb/client/dfs_cache.c: cache_refresh_path: search path: \host\Backup [499614.188576] CIFS: fs/smb/client/dfs_cache.c: get_dfs_referral: get an DFS referral for \host\Backup [499614.188586] CIFS: fs/smb/client/connect.c: VFS: leaving mount_put_conns (xid = 110) rc = 0 [499614.188588] CIFS: VFS: cifs_mount failed w/return code = -13
tardis (143 rep)
Jan 28, 2025, 08:05 AM • Last activity: Jan 28, 2025, 10:13 AM
0 votes
0 answers
76 views
ksmbd share looks empty at client side
I'm trying to get ksmbd work on a machine running bookworm. But regardless if I'm using a Linux GUI, CLI or a Windows 10 Client, I'm unable to browse through files or directories within the mounted share. But I'm able to create files and directory's on the ksmb server, to edit them und to remove the...
I'm trying to get ksmbd work on a machine running bookworm. But regardless if I'm using a Linux GUI, CLI or a Windows 10 Client, I'm unable to browse through files or directories within the mounted share. But I'm able to create files and directory's on the ksmb server, to edit them und to remove them again. Because all cients work the same way I guess it's a ksmbd problem. All following data are from Linux CLI By the way, regardless if I login to the server via ssh or sshfs. The user 'henning' did always see files and directories. Note. All files on the server within /zPool are mounts of ZFS repositories with posix acl's. When using the share "example" from my ksmbd.conf, which points to /tmp on the server, everything works as expected. Is this an error, or am I missing something. Did not find a hint anywhere... lets have a look into the mountpoint before start
# vdir /mnt/NAS/
insgesamt 8
drwxrwxr-x  2 admin admins 4096 29. Jul 2020  .
drwxr-xr-x 15 root  root   4096 31. Dez 19:14 ..
mount share to local dir
# mount -t cifs //pve.dry.lan/tmp /mnt/NAS/
Password for henning@//pve.dry.lan/tmp:
no error, seems that nothing happened client
# vdir /mnt/NAS/
insgesamt 4
drwxr-xr-x  2 root root    0 12. Jun 2022  .
drwxr-xr-x 15 root root 4096 31. Dez 19:14 ..
but try to create dir & file, nor errors so far
# mkdir /mnt/NAS/ksmbd-test-dir
# echo 1234 > ksmbd-text.txt
seems that nothing happened again
# vdir /mnt/NAS/
insgesamt 4
drwxr-xr-x  2 root root    0 12. Jun 2022  .
drwxr-xr-x 16 root root 4096 31. Dez 19:17 ..
lets look on the server, new created entry's are there
$ vdir /zPool/tmp/
...
drwxrwsr-x+  2 henning admins         2 Dec 31 19:19 ksmbd-test-dir
-rwxrwxr-x+  1 henning admins         5 Dec 31 19:20 ksmbd-test.txt
...
$ getfacl /zPool/tmp/
getfacl: Removing leading '/' from absolute path names
# file: zPool/tmp/
# owner: admin
# group: admins
# flags: -s-
user::rwx
group::rwx
other::r-x
default:user::rwx
default:user:admin:rwx
default:group::r-x
default:group:admins:rwx
default:mask::rwx
default:other::r-x
$ getfacl /zPool/tmp/ksmbd-test
ksmbd-test-dir/ ksmbd-test.txt  
root@pve:/zPool/tmp# getfacl /zPool/tmp/ksmbd-test-dir/
getfacl: Removing leading '/' from absolute path names
# file: zPool/tmp/ksmbd-test-dir/
# owner: henning
# group: admins
# flags: -s-
user::rwx
user:admin:rwx
group::r-x
group:admins:rwx
mask::rwx
other::r-x
default:user::rwx
default:user:admin:rwx
default:group::r-x
default:group:admins:rwx
default:mask::rwx
default:other::r-x
$ getfacl /zPool/tmp/ksmbd-test.txt 
getfacl: Removing leading '/' from absolute path names
# file: zPool/tmp/ksmbd-test.txt
# owner: henning
# group: admins
user::rwx
user:admin:rwx
group::r-x
group:admins:rwx
mask::rwx
other::r-x
finaly the ksmbd.conf
[global]
	; global parameters
	bind interfaces only = no
	deadtime = 0
	guest account = nobody
	interfaces = 
	ipc timeout = 0
	kerberos keytab file = 
	kerberos service name = 
	kerberos support = no
	map to guest = never
	max active sessions = 1024
	max connections = 128
	max open files = 10000
	netbios name = KSMBD SERVER
	restrict anonymous = 0
	root directory = 
	server max protocol = SMB3_11
	server min protocol = SMB2_10
	server multi channel support = no
	server signing = disabled
	server string = SMB SERVER
	share:fake_fscaps = 64
	smb2 leases = no
	smb2 max credits = 8192
	smb2 max read = 4MB
	smb2 max trans = 1MB
	smb2 max write = 4MB
	smb3 encryption = auto
	smbd max io size = 8MB
	tcp port = 445
	workgroup = WORKGROUP
	durable handles = no

	; default share parameters
	browseable = yes
	comment = 
	create mask = 0744
	crossmnt = yes
	directory mask = 0755
	force create mode = 0000
	force directory mode = 0000
	force group = 
	force user = 
	guest ok = no
	hide dot files = yes
	inherit owner = no
	invalid users = 
	oplocks = yes
	path = 
	read list = 
	read only = ; yes
	store dos attributes = yes
	valid users = 
	veto files = 
	vfs objects = 
	write list = 

[example]
	comment = read only /tmp access
	path = /tmp

[tmp]
        comment = temp share
        path = /zPool/tmp
        create mask = 0774
        directory mask = 0775
        force group = admins
        hide dot files = no
	read only = no
        write list = henning,moni
Die Rylls (1 rep)
Jan 1, 2025, 10:18 AM
5 votes
5 answers
25359 views
CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
Linux: 4.18.0-305 OS: CentOS 8.4 I have an SMB folder that is mounted with the following command: ``` mount -t cifs -o iocharset=utf8,rw,credentials=${_passwordFile},nobrl,nounix,file_mode=0644,dir_mode=0755,rsize=65536,wsize=130048,uid=10002,gid=1005,vers=3.0 //SMB_FOLDER LOCAL_FOLDER ``` Sometimes...
Linux: 4.18.0-305 OS: CentOS 8.4 I have an SMB folder that is mounted with the following command:
mount -t cifs -o iocharset=utf8,rw,credentials=${_passwordFile},nobrl,nounix,file_mode=0644,dir_mode=0755,rsize=65536,wsize=130048,uid=10002,gid=1005,vers=3.0 //SMB_FOLDER LOCAL_FOLDER
Sometimes it happens that the SMB source is no longer available. Then I get the following error message in
:
Dec  1 12:40:09 XXXX kernel: CIFS: VFS: \\SMB_FOLDER Send error in SessSetup = -13
Dec  1 12:40:09 XXXX kernel: CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
Dec  1 12:40:09 XXXX kernel: CIFS: VFS: \\SMB_FOLDER Send error in SessSetup = -13
Dec  1 12:40:10 XXXX kernel: CIFS: Status code returned 0xc000006d STATUS_LOGON_FAILURE
This error is permanently SPAMMING to the log files. Even if I unmount the folder, the error message is spammed permanently.
umount \\SMB_FOLDER
Although I unmount the folder, I cannot delete it. I get the following error message:
rm: removing 'LOCAL_FOLDER' is not possible: Device or resource busy
The following commands do not provide any output:
+D LOCAL_FOLDER
and
LOCAL_FOLDER
displayed. How can I solve the problem without rebooting?
Rico R. (59 rep)
Dec 1, 2021, 11:59 AM • Last activity: Dec 31, 2024, 04:59 PM
1 votes
0 answers
818 views
NAS issues with SMB/CIFS; how to 'see' client-server messaging?
I have a new Synology NAS (DS1621+), and have begun integration into my home network. I'm having some problems using it with my Linux hosts. I can mount the NAS, but the permissions (as seen from Linux) are not what I want them to be. I'm under the impression that ownership & permissions can be *"ma...
I have a new Synology NAS (DS1621+), and have begun integration into my home network. I'm having some problems using it with my Linux hosts. I can mount the NAS, but the permissions (as seen from Linux) are not what I want them to be. I'm under the impression that ownership & permissions can be *"mapped"* from the NAS to my Linux clients, but it's unclear to me how this is done. My Linux hosts are all Debian-based units, and file services provided by the Synology NAS are via SMB. From Linux, I use the *cifs-utils suite* (mount -t cifs ...) to mount the shares. I've contacted Synology, and was surprised to learn: **1:** Synology does not provide tech support to "command line" users. **2:** Synology claimed their SMB implementation is proprietary, and do not provide any (useful) documentation on the interface. I *suspect* that Synology's implementation is not *that* far off mainstream, but after some trial-and-error, I'm still having *"permissions issues"*. Also, the mount.cifs manual has many options whose purpose and effect are vague to me. Are there any Linux tools available that can help identify how the various options and parameters in mount.cifs affect permissions as seen from the Linux client's perspective? I'd like to eliminate as much of the *trial-and-error* as possible. I'm interested in using SMB instead of NFS because I've heard more negatives on NFS than I have SMB. I have created the users on the Synology side and added them to the SMB config there. #### EDIT: 2022-07-12; More reading, findings The *variables* which seem to be in play are: 1. the state of the Linux implementation of the ["Unix Extensions"](https://wiki.samba.org/index.php/UNIX_Extensions) to SMB, and the version on my client machine 2. the state of the server's (Synology's) implementation of SMB/Samba 3. the state of the server's (Synology's) implementation of the "Unix Extensions" In an effort to improve the quality of this question, I've attempted to define these variables in the context of my question: 1. Re the state of the Linux implementation of the "Unix Extensions":
$ mount.cifs --version
   mount.cifs version: 6.11
   # NOTE1: Unix Extensions are enabled by default per man mount.cifs 
   # NOTE2: see also 'modinfo cifs'
2. Re server (Synology) version of SMB/Samba:
$ ssh admin@SynologyNAS-1
   /$ samba --version
   Version 4.10.18 
   /$ uname -srm
   Linux 4.4.180+ x86_64
3. Re server (Synology) version of the "Unix Extensions" ***I'm at a loss on how to do this, so I tried smbclient:***
$ smbclient \\\\SynologyNAS\\rpi_share -U=pi
   Enter WORKGROUP\pi's password:
   Try "help" to get a list of possible commands.
   smb: \> help
   ?              allinfo        altname        archive        backup
   blocksize      cancel         case_sensitive cd             chmod
   chown          close          del            deltree        dir
   du             echo           exit           get            getfacl
   geteas         hardlink       help           history        iosize
   lcd            link           lock           lowercase      ls
   l              mask           md             mget           mkdir
   more           mput           newer          notify         open
   posix          posix_encrypt  posix_open     posix_mkdir    posix_rmdir
   posix_unlink   posix_whoami   print          prompt         put
   pwd            q              queue          quit           readlink
   rd             recurse        reget          rename         reput
   rm             rmdir          showacls       setea          setmode
   scopy          stat           symlink        tar            tarmode
   timeout        translate      unlock         volume         vuid
   wdel           logon          listconnect    showconnect    tcon
   tdis           tid            utimes         logoff         ..
   !
   smb: \> ? posix
   HELP posix:
   	   turn on all POSIX capabilities
   
   smb: \> posix
   Server doesn't support UNIX CIFS extensions.
   smb: \> ? chmod
   HELP chmod:
	     chmod a file using UNIX permission
   
   smb: \> chmod test-touch-4B.txt 666
   Server doesn't support UNIX CIFS calls.
   ...
#### 2022-07-12; Conclusions & Revised Questions? The above results with smbclient ***suggest*** that with respect to SMB/CIFS, my client software is [*up to speed*](https://idioms.thefreedictionary.com/up+to+speed) , but my shiny new Synology NAS is far [*behind the curve*](https://idioms.thefreedictionary.com/behind+the+curve) . My original question now becomes, "Are these results accurate; is there a more conclusive or accurate method to determine the status of a product when the vendor refuses any information on it?" For those with similar questions, I can only offer this: >***In my case***: I mount using Synology user pi credentials. Doing so leaves my Linux user pi unable to write to the mounted share - despite the fact that Synology user pi had been given R&W privileges in the Synology DSM. I found that adding the uid=pi and gid=pi options to my mount -t cifs command, at least enabled the Linux user pi to write to the SMB share on the Synology server. ***Why*** this works I will have to leave for others to answer. ### Further Reading: 1. [The SMB UNIX Extensions Wiki](https://wiki.samba.org/index.php/UNIX_Extensions) 2. [CIFS VFS - Protocol extensions to the Common Internet File System for better POSIX file I/O semantics](https://www.samba.org/samba/CIFS_POSIX_extensions.html) 3. [A Search: what are the "Unix Extensions" for SMB/CIFS/Samba?](https://duckduckgo.com/?t=ffab&q=what+are+the+%22Unix+Extensions%22+for+SMB%2FCIFS%2FSamba&atb=v278-1&ia=web) . 4. [Samba version 4.3 or newer supports SMB 3.1.1](https://www.admin-magazine.com/Archive/2017/40/SMB-3.1.1-in-Windows-Server-2016) 5. [Linux cifs mailing list](http://vger.kernel.org/vger-lists.html#linux-cifs) 6. mount.cifs and mount.smb3 are *nearly* the same; ref man mount.cifs - which is also the manual for mount.smb3. 7. [The SMB3-Linux Wiki](https://wiki.samba.org/index.php/SMB3-Linux) 8. [Are SMB POSIX Extensions Same As SMB Unix Extensions?... *Apparently not*](https://snia.org/sites/default/files/SDC/2020/053-French-SMB3-POSIX-Extensions-Phase.pdf) 9. [CIFS Protocol Extensions Update, fm 2006 (This has been YEARS in the making)](https://download.samba.org/pub/samba/cifs-cvs/snia-developer-2006-cifs-extensions.pdf) 10. [A Tour through the CIFS Protocol Extensions and Linux CIFS client, fm. 2008](https://vdocument.in/a-tour-through-the-cifs-protocol-extensions-and-linux-cifs-almost-ntfscifs.html) . 11. [SMB3 POSIX Extensions Phase 2 ... what is next? (fm. 2020)](https://snia.org/sites/default/files/SDC/2020/053-French-SMB3-POSIX-Extensions-Phase.pdf) 12. [The video of #10 above](https://www.snia.org/educational-library/smb3-posix-extensions-phase-2-now-they-are-what-next-2020) 13. [The Linux kernel user’s and administrator’s guide » CIFS (note: more verbiage by Steve French)](https://www.kernel.org/doc/html/latest/admin-guide/cifs/index.html) 14. [What Is SMB Protocol and Why Is it a Security Concern?](https://cybersophia.net/articles/what-is/what-is-smb-protocol-and-why-is-it-a-security-concern/) 15. [Server Message Block - Wikipedia](https://en.wikipedia.org/wiki/Server_Message_Block)
Seamus (3772 rep)
Jul 8, 2022, 03:36 PM • Last activity: Dec 10, 2024, 01:22 AM
0 votes
0 answers
40 views
connected to samba share on nas but after restarting arch desktop problems occur
I recently swapped from Windows 10 to Arch Linux. I connected to a Samba share on NAS but after restarting Arch desktop, the Nautilus file manager says "folder is empty". I connected to it via a symlink so I can acces all my files.
I recently swapped from Windows 10 to Arch Linux. I connected to a Samba share on NAS but after restarting Arch desktop, the Nautilus file manager says "folder is empty". I connected to it via a symlink so I can acces all my files.
BubblesVODS (1 rep)
Nov 16, 2024, 02:06 AM • Last activity: Dec 2, 2024, 01:07 PM
0 votes
0 answers
200 views
How do I set the ACLs/Folder permissions on a zfs dataset to allow SMB share with Samba?
Background info: ----------------- - Linux Mint 22 - Installed zfs tools - Installed Samba to enable smb sharing - I am new to Linux and I'm sure there is just a missing piece somewhere. What I have Done So Far: ------------------------ I created a zfs dataset and changed the following properties: `...
Background info: ----------------- - Linux Mint 22 - Installed zfs tools - Installed Samba to enable smb sharing - I am new to Linux and I'm sure there is just a missing piece somewhere. What I have Done So Far: ------------------------ I created a zfs dataset and changed the following properties:
sudo zfs set nbmans=on sharesmb=on NASMainPool/WNAS
I made my account as the owner of the file with:
sudo chmod 1000 /NASMainPool/WNAS
Then going through the Nemo GUI I went to: NASMainPool/WNAS -> Properties -> "share". Tried to enable share and allow for guest access -> got prompted to add additional permissions -> Clicked Add -> got this error: "Could not changer permissions of folder "WNAS". What ACL/Permissions setting am I missing? Nemo GUI Settings For Enabling Share Nemo GUI Error
Erick W (1 rep)
Nov 1, 2024, 05:02 AM
Showing page 1 of 20 total questions