-- Leo's gemini proxy

-- Connecting to rkta.srht.site:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

Rene Kita's weblog


Blog[0] About[1] RSS[2] Links[3]


Wrong permissions on jekyll site files


2018-12-27


Problem


If you changed your default umask from 022 to something more strict and get Error 403 for your website after putting your _site's files via ftp:


Your file permissions are not what the need to be for your webserver.


Solution


Remove the _site directory:


	rm -r _site

Build your site with:


	(umask 022 && jekyll build)

Using jekyll serve here worked not as anticipated, so I'll stick with removing _site after using serve.


---- *Update 2019-07-29 21:41:13 +0200*


What a mess! What I said above is not always sufficient, files in pages or _includes are not affected by the jekyll build. Those files seem to be just copied with their original permissions. To find all files with wrong permissions, go to the directory you want to check and do


	find \! -perm 644 -type f -o \! -perm 755 -type d

Directories need 755 and files need 644. To automatically change permissions you need two steps:


	find \! -perm 644 -type f -exec chmod 644 {} \;
	find \! -perm 755 -type d -exec chmod 755 {} \;

Last modified: 2018-12-27T00:00:00Z


E-mail: mail@rkta.de[4] IRC: #rkta[5] on Libera.Chat[6]

Copyright (c) 2017-2024 Rene Kita


[0] Blog

[1] About

[2] RSS

[3] Links

[4] mail@rkta.de

[5] #rkta

[6] Libera.Chat

-- Response ended

-- Page fetched on Fri May 10 12:51:36 2024