Relatively new to Ubuntu. 21.10. Stuff I’ve tried so far:
I have seen other threads regarding this and have made sure the Samba share names and folder names do not match. Folder actual name: nasdrive | Share: 4tb | Mount point: nas
Mounted via fstab. Using credentials stored in a local file, ~/.smbcreds, which is called in fstab.
Windows can read/write without any issues whatsoever, when using the exact same samba credentials.
Ubuntu can write to the share ONLY from console via sudo touch /media/nas/testfile
fstab entry: //192.168.50.56/NASdrive /media/nas cifs vers=3.0,credentials=/home/username/.smbcreds
The .smbcreds file is as follows:
USERNAME=user
PASSWORD=P@s5w0rd
The Samba share is hosted from a Raspberry Pi. It’s a physically separate machine from the computer attempting to write.
>Solution :
CIFS will mount a share with owner = root and permissions of 755 so only root will be able to write to the share on the client.
One way to fix this is to replace root with you so you become the owner. You do that by adding uid=username ( where username is your local login user name ) to the list of options.
Change this:
//192.168.50.56/NASdrive /media/nas cifs vers=3.0,credentials=/home/username/.smbcreds
To this:
//192.168.50.56/NASdrive /media/nas cifs uid=username,vers=3.0,credentials=/home/username/.smbcreds