Web lists-archives.com

Re: User rw Permissions on New Hard Drive

Le 05/03/2019 à 15:17, Stephen P. Molnar a écrit :

sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0 457.9G  0 part /
├─sda2   8:2    0     1K  0 part
└─sda5   8:5    0   7.9G  0 part [SWAP]
sdb      8:16   0   1.8T  0 disk
├─sdb1   8:17   0   1.8T  0 part /media/comp/900b5f0b-4f3d-4a64-8c91-29aee4c6fd07
├─sdb2   8:18   0     1K  0 part
└─sdb5   8:21   0   7.9G  0 part
sdc      8:32   0 465.8G  0 disk
└─sdc1   8:33   0 465.8G  0 part /media/comp/1f363165-2c59-4236-850d-36d1e807099e
sr0     11:0    1  1024M  0 rom

Here is wwhat I'm proposing:

/dev/hda1 / ext4 defaults 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb1 /hdb1 ext4 defaults 0 0
/dev/hdc1 /hdc1 ext4 defaults 0 0

There are two key questions:

     1.  Will the boot proceed to completion?

No. /dev/hd* do not exist.

     2.  Will users have read/write permission?

No. At best, you will end up in emergency mode with a read-only root filesystem.

Finally, if the answer(s), to either or both, is/are 'no' - what should the fstab entries be in order to allow users to Read/Write?

Leave existing / and swap lines as they are.
Device names /dev/sd* are not persistent and may change at each boot.
Use UUID or LABEL instead of device names to identify the filesystem.
Do not name mount points after supposed device names. Choose names based on contents instead.

Finally, user permissions are not set in fstab. They are set in the filesystem itself, using chown/chmod if you are using standard Unix permissions or setfacl if you are going with ACLs.