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:

Add new comment

The content of this field is kept private and will not be shown publicly.
 8888ba.88ba    888888ba    888888ba    .88888.    888888ba  
88 `8b `8b 88 `8b 88 `8b d8' `88 88 `8b
88 88 88 a88aaaa8P' a88aaaa8P' 88 a88aaaa8P'
88 88 88 88 `8b. 88 `8b. 88 YP88 88
88 88 88 88 .88 88 .88 Y8. .88 88
dP dP dP 88888888P 88888888P `88888' dP

Enter the code depicted in ASCII art style.