Tuesday, May 7, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 2010  / 3 Years ago, tue, november 16, 2021, 12:09:59

I have a root account from which I do all of my tasks. I set up my partitions to mount at startup. I have also created an account for my younger brother. I do not want him to access specific partitions, while still having access to others.



I have:




  • sda5

  • sda6

  • sda7



I want to block access to sda5 but want to give him permission to access the other sda partitions. How can I do that?


More From » mount

 Answers
3

Thanks for the help guys. Both the answers helped me find out what I need to do. Here's what I have done.



My other sda are ntfs file system so I cannot directly change permission. So I have to mount it in a folder to which only I have access.



I make a folder in /media named secret with terminal



cd /media
sudo mkdir -p secret


Then I change ownership of this folder with chown command.



sudo chown XXXX:XXXX /media/secret


Where XXXX in my user name. Then I changed permission to that folder so that only I can access.



sudo chmod 700 /media/secret


Then I had to edit /etc/fstab for appropriate mounting point of sda5.



gksudo gedit /etc/fstab


Then add



/dev/sda5        /media/secret  ntfs defaults           0  0


at the end and saved it. Then reboot.



Viola! It worked.


[#36770] Wednesday, November 17, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cheeturage

Total Points: 432
Total Questions: 111
Total Answers: 115

Location: Bahrain
Member since Tue, Mar 1, 2022
2 Years ago
cheeturage questions
Sat, Dec 4, 21, 02:22, 2 Years ago
Mon, Jan 2, 23, 22:39, 1 Year ago
Sun, Sep 12, 21, 03:21, 3 Years ago
;