[ Solved without help] hard drive permissions - for all users

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
3pinner
Level 3
Level 3
Posts: 128
Joined: Mon Mar 05, 2012 8:47 pm

[ Solved without help] hard drive permissions - for all users

Post by 3pinner »

running Mint 21
there are two user accounts on this computer.
I installed two ssd drives. I can read and write to both of them.
On the other account, I can open them but cannot read or right.
HOw do I change ownership and or permissions so both of us can use the new drives?
thanks!
Last edited by LockBot on Mon Dec 04, 2023 11:00 pm, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
3pinner
Level 3
Level 3
Posts: 128
Joined: Mon Mar 05, 2012 8:47 pm

Re: hard drive permissions - for all users

Post by 3pinner »

still having issues with this basic procedure - sorry about that!
I started with Disks utility to format/partition, and mount at startup.

Then followed instructions to mount the disk at root, and supposedly give access to both of us on this computer using:

Code: Select all

sudo mkdir /photos
sudo chmod -R 777 /photos
In my user account (where I installed the drive) I can access and write to the folder, but when I log into the other user account I still cannot access it. The message is: "You do not have permissions to view the contents"

When I use ls -l to check permissions here is what I see:

Code: Select all

anyname@anyname-System-Product-Name:~$ ls -l /dev/sdb1
brw-rw---- 1 root disk 8, 17 Jun  5 10:45 /dev/sdb1
right clicking on the Photos icon on my desktop will open properties, but when I click on permissions I get "the permissions of Photos could not be determined"

What I need to change?
Thanks
3pinner
Level 3
Level 3
Posts: 128
Joined: Mon Mar 05, 2012 8:47 pm

Re: [ Still need help with] hard drive permissions - for all users

Post by 3pinner »

Found a real help here on Youtube to more fully understand how to view/change permissions:
How to use chmod Manage File Permissions in Linux (Posted by Linode)
https://www.youtube.com/watch?v=ngJG6Ix5FR4

I cd into the /mnt folder to find my drive called Photos. all the changes took place here.

Code: Select all

cd /mnt
ls -l 
Saw that the user was me, and the group was also me, so nobody else could have access.
I used chown to change the group to users, since the other user (my wife) on this computer is in the users group.

Code: Select all

chown :group Photos
Now I had me as owner, group as Users

next I checked the permissions of the my Photos drive and I had full permissions , the users and others group had none.
That is why she could not read the Photos drive. She could open it, but got the message she had no permissions to see anything on the drive.

I used chmod to add full permissions (read,write,Execute) for users group, and limited permissions (read and execute permissions) for the others group. I'll probably go back and change it to read only.

Code: Select all

 chmod g+r,g+w,g+x o+r,o+x Photos

Both of us can now use the drive. I have control of both my stuff and my wife's, she can only access and work with hers. Just what I wanted.

It would be nice to have a GUI to do this, or have it as part of the Disks program so it could be done all at once. I don't do this often enough to remember all the steps. But now ITS DONE!
I hope this will be helpful to someone else.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: [ Still need help with] hard drive permissions - for all users

Post by linux-rox »

3pinner wrote: Mon Jun 05, 2023 5:19 pm It would be nice to have a GUI to do this
File Manager, when opened as Root/Admin, can do this. Right-click file or folder; Properties > Permissions tab.
3pinner
Level 3
Level 3
Posts: 128
Joined: Mon Mar 05, 2012 8:47 pm

Re: [ Solved without help] hard drive permissions - for all users

Post by 3pinner »

First my apology for such a late reply -
Thank you for that suggestion. I have used it on other occasions,
Locked

Return to “Storage”