[Solved] HDD I use for drive backup and storage only runs as root. Help me safely change permissions?

laserdiscdisciple

New Member
Joined
Apr 23, 2020
Messages
6
Reaction score
0
Credits
0
Hi y'all, I'm new to Linux, but I'm having a wonderful time getting acquainted with it. This is by far my favorite OS experience. However...

The last several times I got too curious about my drives, I broke my OS, mostly owing to cloned UUID and other shenanigans while I was learning the OS and how partitions work (which I still am trying to understand fully).

Anyhow, the details: I have a Thinkpad T420 that is running Mint 19.3 off of a 128gb MSATA SSD. I have Timeshift scheduled to make regular backups to a 1tb HDD, and I am currently waiting on an 240gb SSD which will go in the Ultrabay and act as an extended partition for the OS drive.

The MSATA is SDB1, the HDD is SDA1. Timeshift seems to have no problem making my backups. But I cannot save any files to that drive manually without running Nemo as root. I'm very new to Linux, and as stated I have caused several reinstalls and restores playing with the drives, so I'm hoping you all can help me figure out how to mount this thing in the right place, with the right permissions, permanently, and maybe teach me a thing or two in the process. Anyhow, below is the relevant information.



laserdiscdisciple@DiscoVision:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
└─sda1 8:1 0 931.5G 0 part /media/root/minthdd
sdb 8:16 0 119.2G 0 disk
└─sdb1 8:17 0 119.2G 0 part
├─mint--vg-root 253:0 0 118.3G 0 lvm /
└─mint--vg-swap_1 253:1 0 976M 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
laserdiscdisciple@DiscoVision:~$ sudo blkid
[sudo] password for laserdiscdisciple:
/dev/sda1: LABEL="minthdd" UUID="d2717b39-6683-4d19-a657-8c1e5171ab7d" TYPE="ext4" PARTUUID="6193f9e8-01"
/dev/sdb1: UUID="6hqpXe-e4hA-hUVY-GySD-t47y-sHtr-3IQ7Um" TYPE="LVM2_member" PARTUUID="27a01c13-01"
/dev/mapper/mint--vg-root: UUID="dbd2ef84-9bf4-4702-b395-8d67401d4472" TYPE="ext4"
/dev/mapper/mint--vg-swap_1: UUID="2e35a53b-dfff-4851-8039-96efe0cfa204" TYPE="swap"
laserdiscdisciple@DiscoVision:~$ mount -l
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=8046740k,nr_inodes=2011685,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1616904k,mode=755)
/dev/mapper/mint--vg-root on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=46,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17558)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1616900k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda1 on /media/root/minthdd type ext4 (rw,nosuid,nodev,relatime,uhelper=udisks2) [minthdd]
laserdiscdisciple@DiscoVision:~$ ls -l /media
total 8
drwxr-x---+ 4 root root 4096 Apr 23 08:59 laserdiscdisciple
drwxr-x---+ 3 root root 4096 Apr 23 08:57 root
laserdiscdisciple@DiscoVision:~$ touch /media/laserdiscdisciple/checkwrite
touch: cannot touch '/media/laserdiscdisciple/checkwrite': Permission denied
laserdiscdisciple@DiscoVision:~$ ls -l /media/laserdiscdisciple
total 8
drwx------ 2 root root 4096 Mar 23 01:21 'LINUX MINT'
drwxr-xr-x 2 root root 4096 Apr 23 08:59 MINTHDD
 


It looks like this is your backup drive..
/media/root/minthdd
but it's hard to be sure.

Can you give output from "df -h"

"If" this is your backup drive, you have two options.
chmod -R 777 /media/root/minthdd

or

chown -R laserdiscdisciple /media/root/minthdd

at the bottom you have /media/laserdiscdisciple
(Which isn't in the output of your mount command)

If this is your backup disk...

chmod -R 777 /media/laserdiscdisciple

or chown -R //media/lasterdiscdisciple
 
Results of df -h

Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 1.4M 1.6G 1% /run
/dev/mapper/mint--vg-root 116G 36G 75G 33% /
tmpfs 7.8G 36M 7.7G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 1.6G 32K 1.6G 1% /run/user/1000



And yeah, Mint HDD is my backup.
 
ran it again with sudo

sudo df -h
[sudo] password for laserdiscdisciple:


Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 1.4M 1.6G 1% /run
/dev/mapper/mint--vg-root 116G 36G 75G 33% /
tmpfs 7.8G 36M 7.7G 1% /dev/shm
tmpfs 5.0M 8.0K 5.0M 1% /run/lock
tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup
tmpfs 1.6G 32K 1.6G 1% /run/user/1000
/dev/sda1 916G 95G 776G 11% /media/root/minthdd
 
I should clarify that I want to make the disc accessible without root, readable and writeable so that I can use it as both a backup and for mass storage. I though the 777 in that context makes it inaccessible to read and write? I don't know anything though, that's just something I saw in passing while I was trying to figure what to do on my own before.
 
chmod 777 ... means open everything up as far as possible.
chown (user) /media/root/minthdd ... means make that user the owner of this directory.
 
chmod 777 ... means open everything up as far as possible.
chown (user) /media/root/minthdd ... means make that user the owner of this directory.


Alright, thanks a lot, that did it!

I ended up making a LV with my two SSD then ran chown for MINTHDD, and now it's accessible and everything. I appreciate it, I know it's pretty basic knowledge but hey, now I've learned how to use some very handy commands, and I thank you for that.
 

Staff online


Top