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)
Wed, Oct 15, 8:06 AM
Unknown Object (File)
Wed, Oct 15, 8:05 AM
Unknown Object (File)
Wed, Oct 15, 8:05 AM
Unknown Object (File)
Tue, Oct 14, 9:48 PM
Unknown Object (File)
Thu, Oct 2, 5:52 PM
Unknown Object (File)
Aug 31 2025, 8:28 PM
Unknown Object (File)
Aug 8 2025, 4:57 AM
Unknown Object (File)
Aug 7 2025, 11:11 PM
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.