Need guru help to solve this. New to linux and really can't grasp the way users and groups work.
Using a Pi400 with the Raspberry Debian OS.
I have a NAS with SMB shared folders that I access from the Pi.
After boot, I manually run a bash script ( using a shortcut on the desktop ) that executes :
sudo mount.cifs //192.168.x.xxx/GailOnlinBackup /home/gail/NASdrive -o credentials=/home/gail/.smbcreds,noperm
This works perfectly. Connects to the NAS, mounts the folder and adds a desktop icon for the SMB Folder. I can open the folder and access the files.
Now I want to have the mount run at boot ( instead of having to start with the desktop icon )
used Terminal, changed to the etc folder, and then sudo nano fstab
line added to fstab file :
192.168.x.xxx/GailOnlinBackup /home/gail/NASdrive cifs vers=3.0,credentials=/home/gail/.smbcreds
This is where I get stuck. On reboot, the NASdrive appears in the list of drives in the File Manager, but I can't see the files in the folder - Permission Denied.
the error it throws is : mount:cifs Permission Denied
also tried changing the fstab code to this, but same result :
//192.168.x.xxx/GailOnlinBackup /home/gail/NASdrive cifs vers=3.0,credentials=/home/gail/.smbcreds,iocharset=utf8,gid=0,uid=0,file_mode=0777,dir_mode=0777 0 0
Only if I use Terminal and run : sudo mount -a
then I can access the folders and see the files
So it appears that the line in fstab connects and lists the SMB shared folder, but does not mount it until I run sudo mount -a