I have an SSD on my Ubuntu (20.04) laptop, and followed the instructions here to have it auto-mount on boot:
https://www.techrepublic.com/article/how-to-properly-automount-a-drive-in-ubuntu-linux/
It works! The SSD now mounts to /data/ on boot. Lovely.
But now my shared network drive no longer mounts at startup, and delivers this error:
mount: /media/share: operation permitted for root only.
Here's the fstab, with username and password removed:
UUID=91379bc5-372f-4d83-ac57-25f3990a8926 / ext4 errors=remount-ro 0 1# /boot/efi was on /dev/mmcblk1p1 during installationUUID=5FE3-70E9 /boot/efi vfat umask=0077 0 1/swapfile none swap sw 0 0//192.168.1.113/sambashare /media/share cifs username=[username]password=[password],iocharset=utf8,sec=ntlm 0 0# mounts ssd driveUUID=ae8f74f2-7d88-43e6-8268-1fee5af6c8cd /data auto nosuid,nodev,nofail,x-gvfs-show 0 0
I suspect something in the creation of the group and the chown
command did something, but I'm not sure what, or how to undo it. I'd like to retain the SSD auto-mounting at boot and restore the network drive mounting as well.
As requested, the results of ls -l /media, following sudo chmod g+w /media/share
:
drwxr-x---+ 2 root root 4096 Jun 28 08:03 mattdrwxrwxr-x 2 root root 4096 Jun 15 20:08 share
Also, in case it helps, if I mount the drive manually using
sudo mount -t cifs -o username=[username],password=[password],uid=matt //192.168.1.113/sambashare /media/share
it mounts, and delivers this for ls -l /media
:
drwxr-x---+ 2 root root 4096 Jun 28 08:03 mattdrwxr-xr-x 2 matt root 0 Jun 28 09:13 share