Want change Partition(Drive) Ownership to User

Hello Everyone,

Need some technical help for partition ownership.

Here is my issue :-

Earlier when i was using Windows, i made three partition by dividing 1TB HDD.
1st Partition for C Drive(System)
2nd Partition for Personal Stuff
3rd Partition for Work Stuff

So on Linux i made the exact three partition while installation.
1st Partition as Root ( I won’t touch this partition at all)

I need help on this two partitions :-
2nd Partition as /Home (Here i can’t create a folder on entire partition expect /User Folder)
3rd Partition as default (Here i can’t a create a folder on entire partition)

Am i doing something wrong here? Please help me to setup like Windows Partition on Linux.

Very Good at Windows :sunglasses: but noob at Linux :face_with_head_bandage::sob:

Attaching Screenshot:

hello,

partition is mounted as /run/media/peace/networking/

sudo chown -R $user:$user /run/media/peace/networking/*

https://man.archlinux.org/man/chown.1


for an other place (/home/peace/Working/ ?), you can mount this partition in /etc/fstab file
if you want in your home : Documents, Images, Working, …


ps: 300Go for system partition :scream: 100 Go is already a lot

1 Like

You’re not supposed to. GNU/Linux is not Microsoft Windows, which was originally designed as a graphical user interface for a single-tasking, single-user operating system ─ i.e. MS-DOS.

GNU/Linux is a UNIX-family operating system, and UNIX was designed as a multiuser platform from the ground up. UNIX also doesn’t use the concept of drives. Instead, all storage is mounted to directories, and every file and directory has an owner, a group, and separate permissions for the owner, for the group and “for everyone else”.

Furthermore, the type of filesystem also matters, because the DOS and Windows filesystems do not support POSIX ownership and permissions, which means that these attributes must be emulated when the filesystem is mounted.

I have written a very elaborate tutorial on all of this, which you can find at the link below. It’s a very long read, but it goes into depth on the whole matter. :arrow_down:

6 Likes

Hello @Shabaz :wink:

  1. Just for clarification: You use Btrfs, that means, there should by default only one partition and within this partition, there are subvolumes, which acts like partitions. So default would be:
  • subvolume /@ becomes the root: /
  • subvolume /@home becomes: /home

Example of /etc/fstab:

LABEL=labelofmydisk /media/wholedisk  btrfs defaults                    0 1
LABEL=labelofmydisk /                 btrfs defaults,subvol=@           0 1
LABEL=labelofmydisk /home             btrfs defaults,subvol=@home       0 1
LABEL=labelofmydisk /media/networking btrfs defaults,subvol=@networking 0 1

Everything is on the same partition, but restricted by subvolumes. Then you don’t have to worry about re-partitioning anymore. Need a new partition? Just create a new subvolume…

The wiki page is still in progress, but should have some useful information: Btrfs - Manjaro

  1. /home (uppercase and lowercase matter → /home is not /Home) is only for useraccounts and the data and configs which contain the accounts. Not for “bunch of data”. Therefore /home is by default writeable only as root.

  2. Get familiar with the UNIX filesystem structure. That is fundamentally different to MS-DOS/Windows. @Aragorn has a great introduction, but there also other explanation on the WWW.

4 Likes

Thanks for the replies and tutorial.