Profile picture for Admin

There are couple of users created on one PC for different tasks. The is second ssd connected to PC and two users need the access to it. File system is ext4. The problem is to automate the mount and access somehow.

First, you should create a folder, where second drive will be mounted. For example,

$ mkdir /media/share/

Check the ID of device with command

$ sudo blkid

Add the next line to the /etc/fstab file for automatic mounting

$ sudo nano /etc/fstab

UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX       /media/share     ext4    auto,user,rw    0       0

Let's make mounted drive accessable for all users. Lines below should be added to system autostart:

$ nano /etc/init/share.conf

# Share mount user permissions

description     "Share mount user permissions"
author          "Username"

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and plymouth-ready)
          or runlevel PREVLEVEL=S)

stop on runlevel [016]

        chmod -R a+rwx /media/share/
end script

But one problem is still there - access to newly created folders without reboot. The script should be executed on user switch or login.

More information about mounting images:

Information about init sciprts:


Вміст цього поля є приватним і не буде доступний широкому загалу.
  • Не дозволено жодних HTML теґів.
 o--o  o--o    o-o   o-o    o--o 
| | | o o | \ |
O-o O--o | | | O o-o
| | o O | / |
o o o-O\ o-o o-o

Уведіть код, зображений у стилі Ascii-Арт.