Permissions for secondary user account

I have two user accounts on this system and yesterday after noticing a few issues in this account I logged into the other account to see if they existed there. Long story short they don’t. I then proceeded to start to set it up for use till Plasma 5.20 drops and I can just do a fresh install of EOS then, but I noticed that I had to use “Ownership To Active User” under Root Actions in Dolphin to move and or copy items on my secondary drives / partitions. No big deal till I logged back into my main user account and realized I had to give myself ownership there again. I’m assuming a single fstab file is shared between the two profiles cause all my mount points were exactly the same in the secondary profile as they are in my main user account. My question is simply is there a way to have full ownership of the drives / partitions regardless of which user account I’m in without having to take ownership again each time I switch user accounts? Thanks

WARNING:

Only use the command in my last post in this thread if you’re the only user of the computer OR you don’t care who has access to those files.

1 Like

Try adding the user mount option to the relevant line in the fstab.

You’ll have to explain, cause the only time I look at fstab is as below.

Install OS
Do any updates needed
Install Gparted & Gnome-Disk
Go into /mnt/ create my folders named for the secondary drives / partitions
Open one of the newly created folders and copy it’s address
Launch Disk and find the item matching that folders name
Unmount if needed
Click settings and edit the mount options to point to that folder
Then mount
Then refresh the folder to verify it populated and is mounted properly
Then once all mounts have been fixed I open fstab and look for any lines that need to be removed

I did go to properties, permissions, for Docs and added named user for the second account. I won’t know if that works for a while cause I’m copying some files and it’s got at least 30 minutes longer before it’s done.

This is what user mount option does:

user - Permit any user to mount the filesystem. This automatically implies noexec, nosuid,nodev unless overridden

I would edit /etc/fstab and add that to the line for the disk you want to be mounted by both users. Something like (an example):

UUID=777ace92-81f4-44e0-b91b-f2ff42480739 /Data btrfs defaults,noatime,user 0 2

The issue isn’t mounting any of them. I go into the other user account and they are already mounted exactly as I have them in this account.

Yes, but under the first user account.

I am guessing that if the second user is allowed to mount the partition via fstab, it will get the correct permissions as well to read, write etc.

Looks like the only thing I’s have to do by your example is add the “noexec” before “nosuid”.

/dev/disk/by-uuid/6b808587-8a97-4ce9-85fa-77c285c304ab /mnt/Music/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/11d4f349-7f8a-4d69-837f-bb5f7f578775 /mnt/XXX/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/f2674ffc-f4eb-40e1-b9b6-8bed4b3812c2 /mnt/Movies/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/8a0bf72e-f0fc-42c3-8900-46ef2c8dee5a /mnt/Downloads/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-uuid/bfb52ce1-2ac3-446d-a184-d119e357da0c /mnt/Music\040Videos/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Seagate_Expansion_NA8GZQRG-0:0-part1 /mnt/Movie\040Series/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Seagate_Expansion_NA8GZQRG-0:0-part2 /mnt/Docs/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/wwn-0x50014ee20d9fc1e1-part1 /mnt/Television/ auto nosuid,nodev,nofail,x-gvfs-show 0 0
/dev/disk/by-id/usb-Seagate_Expansion_Desk_NA8FBG8X-0:0-part1 /mnt/Movies\040&\040TV/ auto nosuid,nodev,nofail,x-gvfs-show 0 0

You mean user?

user - Permit any user to mount the filesystem. This automatically implies noexec, nosuid,nodev unless overridden

so this?

/dev/disk/by-uuid/6b808587-8a97-4ce9-85fa-77c285c304ab /mnt/Music/ auto user,nosuid,nodev,nofail,x-gvfs-show 0 0

verus this?

/dev/disk/by-uuid/6b808587-8a97-4ce9-85fa-77c285c304ab /mnt/Music/ auto nosuid,nodev,nofail,x-gvfs-show 0 0

Yes, I guess so. Do it at least for one partition and check if it mounts alright by sudo mount -a. Logout and log in to your second user account an see if you have the correct permissions.

OK I’ll do that in a hour or so cause the file copying still has roughly an hour to go. In the meantime figures crossed and either way it works out thanks a lot, much appreciated.

1 Like

Huston we have liftoff.

OK guess I should of gone with my gut instinct. Added user, for Docs and no love. Went by into the main account, rightclicked Docs, properties, permissions, Advanced Permissions, add enrty, and selected alientest under named user. Only issue is that if in alientest I can’t access those options, but as long as I can do it from alienprober I should be good. Thanks for the help and input.

1 Like

if you open terminal, you do groups , you see what you are member of.

like examle :slight_smile:

Ringo@Blackclover ~ % groups
sys network scanner power libvirt users video storage optical lp kvm disk audio wheel ringo
ringo@Blackclover ~ %

it tell’s also a bit what i use might do or not to do. like wheel is like root/admin with disk might to use some of the disk…

like in user-manager in kde can also setup what a user might have as permissions. otherwise is going root gpassws -a User

bit wiki : https://wiki.archlinux.org/index.php/Users_and_groups

there is also something about file permissions.

basicly dont have to reinstall just look what you can do on this point.

Here’s what I have in each user account.

[alienprober@TheMothership ~]$ groups
sys log network floppy scanner power rfkill users video storage optical lp audio wheel adm autologin


[alientest@TheMothership ~]$ groups
wheel alientest

in kde you have a user manager add these group also on other user

You have instructions? Thanks

or in your other

gpasswd -a [username] [group1] [2] etc

with plasma mayby i mixed upt o much pretty with lxqt :slight_smile:
but check the groups you cann add with gpasswd

https://wiki.archlinux.org/index.php/Users_and_groups#Group_management

1 Like

OK now I have the below, but if I give alientest owbership in alientest I lose it in alienprober still, and vice versa.

bash: cod: command not found
[alienprober@TheMothership ~]$ groups alienprober
sys log network floppy scanner power adm wheel audio lp optical storage video users rfk
ill autologin
[alienprober@TheMothership ~]$ groups alientest
sys log network floppy scanner power adm wheel audio lp optical storage video users rfk
ill alientest
[alienprober@TheMothership ~]$

I am not sure but perhaps instead of using chown to change the ownership you need to look into chmod to change permissions for an specific file/folder.

1 Like

I found this searching for “change ownership to all users linux”. Last part caught my eye.