diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-03 10:47:49 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-03 10:47:49 -0300 |
commit | dc0c08a4fba646845ec7b00e9a5f24eecec5ff17 (patch) | |
tree | 2a145dbdf740aee9d0be134edf3aea4d66177f6a /src | |
parent | 6e703cb825061094b389446ee40e9baecbbe8af3 (diff) | |
download | luarocks-dc0c08a4fba646845ec7b00e9a5f24eecec5ff17.tar.gz luarocks-dc0c08a4fba646845ec7b00e9a5f24eecec5ff17.tar.bz2 luarocks-dc0c08a4fba646845ec7b00e9a5f24eecec5ff17.zip |
fs: fix permissions when creating directories and wrappers
Newly created directories and wrappers need to be executable/traversable by
all.
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/fs/lua.lua | 2 | ||||
-rw-r--r-- | src/luarocks/fs/unix.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/luarocks/fs/lua.lua b/src/luarocks/fs/lua.lua index b5232a52..200a1b0c 100644 --- a/src/luarocks/fs/lua.lua +++ b/src/luarocks/fs/lua.lua | |||
@@ -250,7 +250,7 @@ function fs_lua.make_dir(directory) | |||
250 | if not ok then | 250 | if not ok then |
251 | return false, err | 251 | return false, err |
252 | end | 252 | end |
253 | ok, err = fs.set_permissions(path, "exec", "user") | 253 | ok, err = fs.set_permissions(path, "exec", "all") |
254 | if not ok then | 254 | if not ok then |
255 | return false, err | 255 | return false, err |
256 | end | 256 | end |
diff --git a/src/luarocks/fs/unix.lua b/src/luarocks/fs/unix.lua index d6f3f0ae..f8e272a7 100644 --- a/src/luarocks/fs/unix.lua +++ b/src/luarocks/fs/unix.lua | |||
@@ -109,7 +109,7 @@ function unix.wrap_script(file, dest, deps_mode, name, version, ...) | |||
109 | wrapper:write("exec "..table.concat(argv, " ")..' "$@"\n') | 109 | wrapper:write("exec "..table.concat(argv, " ")..' "$@"\n') |
110 | wrapper:close() | 110 | wrapper:close() |
111 | 111 | ||
112 | if fs.set_permissions(wrapname, "exec", "user") then | 112 | if fs.set_permissions(wrapname, "exec", "all") then |
113 | return true | 113 | return true |
114 | else | 114 | else |
115 | return nil, "Could not make "..wrapname.." executable." | 115 | return nil, "Could not make "..wrapname.." executable." |