[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mount permissions weired



On Jul 11, 2025, Hans wrote:
> Dear list, 
> 
> I am struggeling with a strange behavior when automounting my inbuilt harddrives. 
> 
> I have 3 harddrives, which are mounted to 
> 
> /space  	(sdc1) 	ext4 	
> /daten1	(sdd1)	ext4
> /daten2	(sde1) 	ext4
> 
> So all are the same, and the mountpoints shall all have 
> ownership user:group = root:backup
> 
> However, the latest harddrive I added, wbhich is sde1 shows wrong ownerhips, please see:
> 
> drwxrwx---  22 root backup  4096 11. Jul 10:18 daten1 
> drwxr-xr-x   3 root root    4096 11. Jul 16:30 daten2
> drwxrwx---  12 root backup  4096 25. Jun 21:37 space

Ok, so you've not yet set ownership or permissions on the filesystem
mounted at 'daten2'


> 
> But when I unmount sde1 it looks like this: 
> 
> drwxrwx---   2 root backup  4096 11. Jul 16:13 daten2

You set permissions on that empty directory when nothing was mounted.
Then you mounted a new filesystem (/dev/sde1) with the default ownership
and permissions (root:root & rwxr-xr-x)

> What can bbe wrong? What did I miss? Anything else I should check? 

Nothing is really "wrong", you simply haven't set permissions on the new
filesystem yet.

Fix should be as easy as these three commands:

  1. (sudo) mount /dev/sde1 /daten2
  2. (sudo) chown root:backup /daten2
  3. (sudo) chmod 770 /daten2

(skip mounting if it's already mounted)

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1  E067 6D65 70E5 4CE7 2860

Attachment: signature.asc
Description: PGP signature


Reply to: