I need to mount a directory /home/MyUser/Share
to another computer as an equivalent to smb://IP_address/share
that enables me writing into files there via Nautilus.
Even for MyUser being a sudoer, my attempts
sudo mount -t cifs //IP_address/share /home/MyUser/Share -o username=User_at_IP_address,noexec<
or
sudo mount.cifs //IP_address/share /home/MyUser/Share -rw
enable reading only and
sudo mount --make-shared /home/MyUser/Share
does not enable writing, too.
A standard user can use pkexec
instead of sudo
or change his account via the su
command, but the problem with user rights to write is then even greater.
Please advise me the correct steps. Thanks!
I use
I think this: uid=myusernameonclient,gid=users is what you will need to change. The .credential file includes
You will not need that, if you access the share without credentials.
Firstly test it:
Check the result:
Note that the problem is the local_dir owner and group (root). Your user and group needed to be there, right? Let's fix it:
And the final solution:
Test with:
Add this line to your fstab with
sudo nano /etc/fstab
:To create the credentials
nano /home/MyUser/.credentials
:And change the permissions so only you can read that file:
Source: https://wiki.ubuntu.com/MountWindowsSharesPermanently