fix dir owner
This commit is contained in:
parent
38bba6c8ed
commit
07d3d359d2
|
@ -107,12 +107,13 @@ keyImported keytype user = combineProperties desc
|
|||
f <- liftIO $ keyfile ext
|
||||
ifM (liftIO $ doesFileExist f)
|
||||
( noChange
|
||||
, ensureProperty $ combineProperties desc
|
||||
, ensureProperties
|
||||
[ property desc $
|
||||
withPrivData p $ \key -> makeChange $ do
|
||||
createDirectoryIfMissing True (takeDirectory f)
|
||||
writer f key
|
||||
, File.ownerGroup f user user
|
||||
, File.ownerGroup (takeDirectory f) user user
|
||||
]
|
||||
)
|
||||
keyfile ext = do
|
||||
|
@ -150,4 +151,7 @@ authorizedKeys user = property (user ++ " has authorized_keys") $
|
|||
liftIO $ do
|
||||
createDirectoryIfMissing True (takeDirectory f)
|
||||
writeFileProtected f v
|
||||
ensureProperty $ File.ownerGroup f user user
|
||||
ensureProperties
|
||||
[ File.ownerGroup f user user
|
||||
, File.ownerGroup (takeDirectory f) user user
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue