You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the setgid bit (g+s) is set on a directory, any new files or subdirectories created within it should automatically inherit the directory's group rather than the group of the user creating the file. This behavior is useful for shared directories where consistent group ownership is needed (e.g., collaborative environments or web directories).
// Set up directory with setgidawaitfs.chmod('/var/www',0o2775);awaitfs.chown('/var/www',33,33);// 33 is the default www-data user/gid on unix// Expected behavior: Files created in '/var/www' inherit group from directoryawaitfs.writeFile('/var/www/app/index.html','<html><body>hello</body></html>');conststat=awaitfs.stat('/var/www/app/index.html');console.log(stat.gid);// Should match gid of /var/www
The text was updated successfully, but these errors were encountered:
james-pre
changed the title
[feature-request] Support for Inheriting Group Permission from Directory Using Setgid (g+s) in Filesystem API Emulation
Support for Inheriting Group Permission from Directory Using Setgid (g+s) in emulation layer
Nov 11, 2024
https://en.wikipedia.org/wiki/Setuid#setuid_and_setgid_on_directories
Example
When the setgid bit (g+s) is set on a directory, any new files or subdirectories created within it should automatically inherit the directory's group rather than the group of the user creating the file. This behavior is useful for shared directories where consistent group ownership is needed (e.g., collaborative environments or web directories).
The text was updated successfully, but these errors were encountered: