Need help fixing Permissions of mounted HDD.

I’ve mounted a second HDD using Yast>Partitioner, to automount at ‘/home/emby’. This is my fstab file:

UUID=707d029c-c811-4acb-85cf-36cb7e9ce28f swap swap defaults 0 0UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c / btrfs defaults 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /boot/grub2/i386-pc btrfs subvol=@/boot/grub2/i386-pc 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /boot/grub2/x86_64-efi btrfs subvol=@/boot/grub2/x86_64-efi 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /opt btrfs subvol=@/opt 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /srv btrfs subvol=@/srv 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /tmp btrfs subvol=@/tmp 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /usr/local btrfs subvol=@/usr/local 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/cache btrfs subvol=@/var/cache 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/crash btrfs subvol=@/var/crash 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/libvirt/images btrfs subvol=@/var/lib/libvirt/images 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/machines btrfs subvol=@/var/lib/machines 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/mailman btrfs subvol=@/var/lib/mailman 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/mariadb btrfs subvol=@/var/lib/mariadb 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/mysql btrfs subvol=@/var/lib/mysql 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/named btrfs subvol=@/var/lib/named 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/lib/pgsql btrfs subvol=@/var/lib/pgsql 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/log btrfs subvol=@/var/log 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/opt btrfs subvol=@/var/opt 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/spool btrfs subvol=@/var/spool 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /var/tmp btrfs subvol=@/var/tmp 0 0
UUID=0ad4ed91-92ce-4197-9f64-9c12aea1884c /.snapshots btrfs subvol=@/.snapshots 0 0
UUID=7F21-FED2       /boot/efi            vfat       umask=0002,utf8=true  0 0
UUID=818f916c-9b4a-4174-adee-0a10eebf751c /home                btrfs      defaults              0 0
UUID=bd018885-e085-4f71-bb83-38bd859bcfde /home/emby           btrfs      defaults              0 0



I dont think the permissions are set right:

wolf@linux-stm7:/home> ls -l
total 16
drwxrwxr-- 1 wolf users  92 Apr 26 09:59 **emby**
drwxr-xr-x 1 wolf users 546 Apr 27 12:32 **wolf**


because when i move into the emby directory, i get this:

wolf@linux-stm7:/home/emby> ls -l                                                                                                                                            
total 0                                                                                                                                                                      
drwxrwxr-x 1 480 nm-openvpn  226 Apr 26 11:17 **BACKUP**
drwxrwxr-x 1 480 nm-openvpn 2122 Mar 30 08:03 **INFERIOR**
drwxrwxr-x 1 480 nm-openvpn   62 Apr 22 20:17 **MEDIA**
drwxrwxr-x 1 480 nm-openvpn 3798 Apr 26 11:08 **SOFTWARE**

As you can see, for some reason they belong to a different user & group. I only have 1 user ‘wolf’ and have set to autologin, so i dont understand how this can happen? I tried changing the last fstab line to :

UUID=bd018885-e085-4f71-bb83-38bd859bcfde /home/emby btrfs defaults,uid=wolf,gid=users 0 0

But that failed. This is the user and group it’s assinged to:

wolf@linux-stm7:/home/emby> grep 480 /etc/passwd
rtkit:x:487:**480**:RealtimeKit:/proc:/bin/false
wolf@linux-stm7:/home/emby> grep nm-openvpn /etc/passwd                                                                                                                      
**nm-openvpn**:x:484:476:NetworkManager user for OpenVPN:/var/lib/openvpn:/sbin/nologin


I had run into permission issues before - but that was for a completely different situation. All im looking to do is automount the second hdd to ‘/home/emby’ and my user account ‘wolf’ (the only one i created) have complete access to it. Thank you for reading.

Apperently the directories/files on that file system were NOT created by user wolfi with goup users, but by some other user. I assume you must know that, or did you get that disk from some undefined source (stolen ;))?

When you think user wolfi has all the rights in the world to use that files and that in fact he should own them and not that other user, then you can change the ownership, but f course only as root:

su -
cd home/wolfi/emby
chown -R wolfi:users * .*
exit

BUT, take care!
After the second command (cd /home/wolfi/emby) first check thoroughly that the working directory really is /home/wolfi/emby. Making typos could result in the next command break your system!

I have also an extra question.
I see that you used btrfs as well as for your /home as for /home/emby.
What is the idea behind this? The most important reason for using btrfs is because it supports snapshots. And the default for / on btrfs is setup in a way that it offers you snapshots e.g. at software management. But you have to set that up for e.g. /home. Did you do that? And when do you make snapshots of /home (and /home/emby)?

Apperently the directories/files on that file system were NOT created by user wolfi with goup users, but by some other user. I assume you must know that, or did you get that disk from some undefined source (stolen ;))?

Lol, Well, the files were already on disk. This a fresh install (switched from Leap to TW), IDK how it got assigned to some random user/group.

chown -R wolfi:users * .*

Such as simple solution, I feel ashamed, I didnt know about the ‘-R’. i tried this command without it. Everything is as I want it now. THANK YOU:)

I see that you used btrfs as well as for your /home as for /home/emby.
What is the idea behind this? The most important reason for using btrfs is because it supports snapshots. And the default for / on btrfs is setup in a way that it offers you snapshots e.g. at software management. But you have to set that up for e.g. /home. Did you do that? And when do you make snapshots of /home (and /home/emby)?

I dont know anything about FS’s, I chose btrfs after reading on wikipedia, that it was constantly being developed and newer to other FS’s. So i selected that for everything (including external HDD). I only read a little about Snapshots yesterday, on how it allows you to ‘rollback’ from an update that ‘breaks’ your system. I dont plan on doing any snapshos for ‘/home’ or ‘/home/emby’. Is my situation going to cause issues? I’m a bit worried now…:open_mouth:

Well it seems there was a former owner and he did not shred the data. I always wonder why people complain about hurt privacy and at the same time do such things.

in such a case

man chown

is your friend of course.

Well, btrfs is definitely not the openSUSE default at installation for /home. It is XFS (and you can of course still use ext4). I have no idea if it is to cause issues. I would never use it for those file systems. But I do not use btrfs for my / file system either because I am not interested in snapshots, so this is my own meaning. And I belong to those people where “constantly being developed and newer” will shy me away of such a product instead of going to prefer it.