aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolderpunk <solderpunk@sdf.org>2018-12-09 13:19:58 +0000
committerSolderpunk <solderpunk@sdf.org>2018-12-09 13:19:58 +0000
commit26eb99596285302b63f3403e4cc9278c5ce7c17c (patch)
tree4a3261dd5128709037bde46d39f4cc7917e3950b
parentImplement 'scan' command. (diff)
Use chmod to make new files/dirs world readable/exable.
-rwxr-xr-xtelem.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/telem.lua b/telem.lua
index 5c303d1..151f062 100755
--- a/telem.lua
+++ b/telem.lua
@@ -173,9 +173,11 @@ function do_board()
-- Create directory
local board_dir = path.join(_BBS_ROOT, "boards", board)
lfs.mkdir(board_dir)
+ os.execute("chmod og+rx " .. board_dir)
-- Write topic file
local topic_file = path.join(board_dir, "topic")
file.write(topic_file, desc)
+ os.execute("chmod og+r " .. topic_file)
-- Update representation of BBS
update_boards()
-- Done!
@@ -288,6 +290,7 @@ function do_new()
if not ret then
print(str)
end
+ os.execute("chmod og+r " .. newpath)
-- Done!
print("Post submitted.")
end
@@ -348,6 +351,7 @@ function do_type_reply()
if not ret then
print(str)
end
+ os.execute("chmod og+r " .. newpath)
current_thread_posts = get_posts(current_thread)
current_post_index = #current_thread_posts
do_type_show_post()