File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33def check_home_folder_rights (home_folder ):
44 lines = jessentials .run_command (f"ls -al { home_folder } " , False , True )
5- if lines [1 ][7 ] != "-" or lines [1 ][8 ] != "-" or lines [1 ][9 ] != "-" :
5+ # Check if the home folder has the right permissions for others (no permissions at all) and the right group permissions (no write permissions)
6+ if lines [1 ][7 ] != "-" or lines [1 ][8 ] != "-" or lines [1 ][9 ] != "-" or lines [1 ][5 ] != "-" :
67 print (f"homefoldernotsecure: { lines [1 ]} " )
Original file line number Diff line number Diff line change @@ -2167,7 +2167,13 @@ class Linux {
21672167 /// removes all rights for others at the home folder
21682168 static Future <void > fixHomeFolderPermissions () async {
21692169 runCommandWithCustomArguments (
2170- "/usr/bin/chmod" , ["o-rwx" , Linux .getHomeDirectory ()]);
2170+ "/usr/bin/chmod" ,
2171+ ["o-rwx" , Linux .getHomeDirectory ()],
2172+ );
2173+ runCommandWithCustomArguments (
2174+ "/usr/bin/chmod" ,
2175+ ["g-w" , Linux .getHomeDirectory ()],
2176+ );
21712177 }
21722178
21732179 static Future <void > openAdditionalSoftwareSourcesSettings () async {
You can’t perform that action at this time.
0 commit comments