I have a samba shares drive that is mounted at boot that works as I intend. Here is the fstab file:
//192.168.1.2/ext4tb /mnt/ext4tb cifs ,credentials=/home/frepie/.smbcredentials,iocharset=utf8,vers=1.0,sec=ntlm,user 0 0
When this works normally, I have total read,write and execute privileges on that share
Sometimes, for reasons that I ignore, that shared drive is not mounted at boot. Trying to resolve the issue without rebooting, I used the command
sudo mount.cifs //192.168.1.2/ext4tb /mnt/ext4tb
And the command requests the root password on the samba server
Password for root@//192.168.1.2/ext4tb: ********
The problem is the when doing so, I don't have the write privileges that I have when the mount at boot works normally.
$ mv /home/frepie/Music/Dark\ Latin\ Groove\ -\ La\ Quiero\ A\ Morir /mnt/ext4tb/media/Audio/
mv: cannot create regular file '/mnt/ext4tb/media/Audio/Dark Latin Groove - La Quiero A Morir': Permission denied
Somehow, I am not granted the same privileges when the mount is performed by fstab at boot.
As far as I know, the behavior that you're looking for (i.e. consulting the
/etc/fstab
file, and applying the options found there) only applies if you callmount
directly, rather than one of the "helper" commands likemount.cifs
, and only if you specify EITHER the device or the mountpoint. Fromman mount
:So replace
by either
or
Hi i do exactly the same : smb shares declared in
/etc/fstab
except that is do not automount, and i stored credential files in encrypted folders. I do not experience no issue.Here is an extract of
/etc/fstab
on 18.04See
uid=1000,gid=1000
You may add thoses option : explicitly specify grouid an userid of your Ubuntu user
With the
noauto
option i like, shares are mounted when I click to open them from nautilus file manager.Using
_netdev
option means that this mount needs a networkSeems the answer is to simply mount the drive without cifs i.e.