Page MenuHomeFreeBSD

Provide chmod to flua
ClosedPublic

Authored by 2333_outlook.jp on Mar 11 2020, 10:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Mar 11, 12:16 PM
Unknown Object (File)
Mon, Mar 11, 12:12 PM
Unknown Object (File)
Mon, Mar 11, 12:12 PM
Unknown Object (File)
Fri, Mar 8, 12:36 AM
Unknown Object (File)
Feb 20 2024, 8:30 PM
Unknown Object (File)
Jan 29 2024, 2:13 PM
Unknown Object (File)
Jan 15 2024, 2:12 PM
Unknown Object (File)
Jan 6 2024, 10:59 AM
Subscribers

Details

Summary

Lua does not provide a native way to change the permission of a file. Adding this function will enable flua scripts to access and modify (by using a temp file with right permission, then overwritting) protected files.

usage: > require'posix.sys.stat'.chmod('hello.txt', 511)
0 -- example if success
nil No such file or directory 2 -- example if failure

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

2333_outlook.jp edited the summary of this revision. (Show Details)
2333_outlook.jp edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 13 2020, 2:29 AM
This revision was automatically updated to reflect the committed changes.