Commit 584a24b8 authored by Antoine Fontaine's avatar Antoine Fontaine 👣

Correct paste dir permissions on init

parent b45d54a0
......@@ -26,6 +26,7 @@ executables:
- persistent
- persistent-sqlite
- persistent-template
- unix
- random
- regex-compat
- resource-pool
......
......@@ -14,6 +14,7 @@ import qualified Data.Text as T
import Servant.API hiding (header)
import Servant.Server
import System.Directory
import System.Posix.Files (setFileMode)
import Paste.API (PasteAPI)
import Paste.Handlers (server)
......@@ -54,6 +55,7 @@ argParserInfo = info (argParser <**> helper)
runServer Args{..} = do
createDirectoryIfMissing True pasteDir
setFileMode pasteDir 0o700
db <- runStderrLoggingT $
createSqlitePool (T.pack sqlitePath) 1
forkIO $ cleanupPastes db (pasteDir<>"/")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment