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)
Tue, Oct 6, 10:25 PM
Unknown Object (File)
Wed, Sep 23, 6:11 AM
Unknown Object (File)
Wed, Sep 16, 4:50 PM
Unknown Object (File)
Tue, Sep 15, 11:08 PM
Unknown Object (File)
Tue, Sep 15, 10:47 PM
Unknown Object (File)
Tue, Sep 15, 9:27 PM
Unknown Object (File)
Tue, Sep 15, 3:00 PM
Unknown Object (File)
Mon, Sep 14, 9:11 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.