What's the deal with Deno? We talk with a major contributor to find out. Listen now.

Hot answers tagged

184

You are mounting the CIFS share as root (because you used sudo), so you cannot write as normal user. If your Linux Distribution and its kernel are recent enough that you could mount the network share as a normal user (but under a folder that the user own), you will have the proper credentials to write file (e.g. mount the shared folder somewhere under your ...


49

At work I encountered a similar problem. moun -t cifs just stopped working. Following mounting a CIFS/SMB resource and looking at the output of demsg, I found that adding the option vers=1.0 did the trick. My command looks like mount -t cifs //server/folder ./mountpoint -o user=USER,domain=DOMAIN,vers=1.0


29

I tested the following command successfully: sudo mount -t cifs -o username=[username],password=[password],uid=1001,gid=1001 //172.16.148.2/dfsgob01 /home/ususario/Documentos/benz-win


27

After some more investigation, it looks like this issue is less kernel related and more about how rsync and CIFS interact. As far as I can make out, what is happening is that when rsync closes the destination file, CIFS (and probably any network filesystem) ensures the file is completely flushed and written to the remote disk before the close syscall ...


23

After seeing the dmseg and Googling, I found the solution: One has to add the sec=ntlm option. The problem (feature?) is introduced in recent kernels (I use 3.8.4). I just didn't realize that the problem is kernel-related. So the correct way of mounting is: sudo mount -t cifs //netgear.local/public /media/mountY -o uid=1000,iocharset=utf8,username="adam",...


23

If your question is meant as "what is the difference between the smbfs and cifs file system type of the mount command on Linux?" then I have an answer for you. The file system smbfs is an older FS, originating form the Samba project, that was heavily coupled with the Samba tools (smb.conf, smbmount, etc.). This file system has been deprecated though not yet ...


23

To fill out the answers from @Ken and @Paul: The SMB version needs to be specified when higher than v1: mount -t cifs \ -o username=USERNAME,vers=3.0 \ //server/share \ /mnt/point The Linux cifs kernel client has been included in the kernel since 2.5.42. The cifs protocol (and related earlier SMB dialects) is the default ("vers=1.0") but support ...


23

smbclient is able to look up host names mount is Not able to look up host names To mount by name you have to use a local DNS service like Avahi. Without a local DNS, you have to specify the IP address when connecting. You can use nmblookup -S WORKGROUP to discover the IP address. mount -t cifs //192.168.0.123/Documents /mnt/virginia Usually a better way ...


16

On Ubuntu you can edit your fstab using the gnome-disk-utility. From the terminal run gnome-disks or type Disks from the dash. Select the disk then the partition, from the Option menu select Edit Mount Options.


14

You probably want to add explicit permissions to the mounted file system in the fstab entry: <your other options>,file_mode=0770,dir_mode=0770 This will be on the safe side by allowing all group members to read, write and execute all files and prohibiting access to any other user of the system. If you still want read access for the others you will ...


14

I found an interesting related post here cifs mounted folder keeps disconnecting (ubuntu server), talking of a similar problem (same error, Samba shares). The relevant tidbit here, for following the rest of the answer, is that CIFS mounts use the SMBv1.0 protocol by default, as can be verified issuing the mountcommand, and paying attention to the vers=1.0 ...


12

NFS was invented in the Unix world and so understands traditional Unix permissions out of the box. (The ACL of modern unix systems are another matter, but recent implementations of NFS should cope with them.) Samba was invented in the IBM/Microsoft PC world, to exchange files with systems that had no permissions beyond read-only/read-write. It is now native ...


11

This sounds like your issue, titled: Copied files gain execute bit on Samba/CIFS. excerpt After copying a file with rw-r----- on a CIFS-mounted volume, the copy gets rwxr-----. So it's gaining the execute bit: Further down the page, setting map archive = no in /etc/samba/smb.conf: excerpt [Global] <snip> map archive = no <snip>


11

OK "I" figured it out-- for some reason, adding "vers=3.0" makes it work. I don't know why it was having issues without this, or why it works. but for future reference if others are having this issue with their freenas setups.


10

If you add the share to fstab you should be ok, but remember you need to have a network connection before you actually mount the drive. There "network" option is for that. Now as to making it look "exactly" like a native partition, you can't. There are certain things that are not supported over a network drive. There are even more things that "may" be ...


9

The issue is SAMBA server has build in special support for unix (cifs) clients. When you use mount -t cifs on your linux host all symlinks are passed to you (cifs client) as is. ls /mnt/share/latest/dir/ -l /mnt/share/latest/dir/ -> /opt/share/data/201407 You may dislike this functionality but this is a design decision that has its pros, e.a. is not a ...


9

CONFIG_CIFS=m means the CIFS functionality is compiled into a kernel module. If the cifs module isn't loaded after a reboot, you can append a line cifs to the file /etc/modules. The file lists modules which will be loaded automatically at boot time. To check if the module is already loaded type: lsmod | grep cifs If you don't see 'cifs' in the output, it ...


7

By default the USERSHARE feature of samba is disabled in Fedora. Enabling it is not enough as libshare in the ZFSOnLinux requires a specific usershare path to be set. To get it working set the following in /etc/samba/smb.conf: [global] usershare path = /var/lib/samba/usershares usershare max shares = 100 usershare allow guests = yes ...


7

With out more info I can't say for sure but I have seen this issue when connecting to an older windows server that was running an older protocol version. Remember CIFS is considered a "Dialect" (type) of SMB. There are other types and older setups don't use CIFS. Basically it's like saying two people are speaking. One Spanish and one English, and your ...


7

Finally found a workaround for this issue that works with our NetApp. If you don't need DFS try mounting with the nodfs option. mount -t cifs //server/share/directory /mnt/directory -ocredentials=/path/to/cifs.credentials,nodfs


7

If your company policy allows you to use CIFS then please make sure cifs utility is installed. # lsmod |grep cifs cifs 293313 3 if not then install it # yum install samba-client samba-common cifs-utils or # yum install cifs-utils After installing CIFS utility you should be able to find mount.cifs command. To mount while booting you ...


7

My solution is not the best, I know, but it works ;-). EDIT: Please read my other answer as well, this answer is an evil hack! Create a 2Gb file with dd, format the file e.g. ext3, mount it, add it to fstab and use that as a share. $ dd if=/dev/zero of=filename bs=1024 count=2M $ sudo mkfs.ext4 filename $ cat /etc/fstab /path/to/filename /mount/point ext4 ...


7

I had a similar problem, the module location was changed because of rolling release arch distribution, so path was different. Reboot


7

Suffice to create that file: sudo touch /etc/libuser.conf And re-run the samba configurator.


7

I had to enable the service that automounts network drives as @Ignacio Vazquez-Abrams said. The details are here. sudo systemctl enable systemd-networkd-wait-online


7

You can use the id command: $ id uid=1000(muru) gid=1000(muru) groups=1000(muru),4(adm),24(cdrom),27(sudo)... Just the UID: $ id -u 1000 Just the GID: $ id -g 1000 So, using command substitution: $ sudo mount -t cifs -o "username=${USER},password=${PASSWORD},uid=$(id -u),gid=$(id -g)" \ //server-address/folder /mount/path/on/ubuntu


6

You can find out why this is happening from the following explanation on the Samba web site under the File Permissions and Attributes on MS-DOS and Unix section: https://www.samba.org/samba/docs/using_samba/ch08.html It has to do with mapping the System, Hidden and Archive bits for an MS-DOS filesystem. An MS-DOS filesystem doesn't make use of executable ...


6

By default cifs mounts use protocol 1.0, which besides obsolete, is largely inefficient and does not recover well from sleep for several reasons. Depending on what is your server technology, you can go from using vers=2.1 at least, or vers=3.0. I would advise checking with documentation or vendor which version of the SMB protocol it supports, or at ...


6

dirty_ratio per device Q: Are there any ways to "whitelist" the fast devices to have more write cache? Or to have the slow devices (or remote "devices" like //cifs/paths) use less write cache? There are some settings for this, but they are not as effective as you hoped for. See the bdi ("backing device") objects in sysfs: linux-4.18/Documentation/ABI/...


6

Go to setup and change your 'Display' options: F2 > Display options Do not hide kernel threads and show custom thread names: [ ] Hide kernel threads [x] Show custom thread names Save: F10


Only top voted, non community-wiki answers of a minimum length are eligible