M
M
Maxim Sokhryakov2018-06-16 19:35:46
linux
Maxim Sokhryakov, 2018-06-16 19:35:46

How to mount folders in Linux as Non root?

I'll start from afar. There is a home fileserver on Ubuntu 16.04.
There are two virtual machines, one on Ubuntu 16.04 and one on Ubuntu 18.04.
If I execute the command sudo mount //192.168.*.*/tg /mnt/project -o rw,username=,password= from under U16.04 (the corresponding data is in place <>), then I can easily use any editor ( in particular sublime) and easily edit the application code that is in a folder on the server (I did this to synchronize between a computer and a laptop).
If I run the same script from under U18.04 and open the directory in sublime, then to save it, I need to enter the sudo password. Or run the editor from the console as root.
The question is: how to make it work in 18.04 in the same way as in 16.04.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
J
just_hank_moody, 2018-06-17
@maximsohryakov

sudo is not required to mount drives.
It is enough to add a regular user to the fuse group and mount it through it.
An important point is where to mount. if /mnt/project is root:root, then a normal user will not be able to mount directories. Here, either set the correct rights from under the root, or mount it in /home/$user_name/mnt/remote_folder

D
Dmitry Aleksandrov, 2018-06-16
@jamakasi666

Look right and you will find the truth.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question