I am currently running Cygwin on the target Windows Server 2003 machine to run a shell script that, among other things, creates a bunch of files on disk. However, after creating the files, I no longer have the rights to manage them through Windows.
When files are created, the owner gets the value "SYSTEM", and permissions for Administrators/Creator Group/Creator Owner/system are set only for "special permissions" and nothing more. Permissions for all and users have read and execute, list folder contents and read.
My problem is that I cannot delete / modify files now through Windows. I would prefer something built into my scripts (either a shell script, or something to call in Cygwin), which would allow administrators to fully control the folder and all content.
My current workaround was to either modify the files via Cygwin, but this is not preferable. I also used setfacl -r -m default:other:rwx to add write setfacl -r -m default:other:rwx for the Users group, but it does not have a recursive option and still does not give "full control"
Is there a better way to use setfacl ? Is it possible to invoke a shell script using different / elevated permissions?
The getfacl results in the newly created directory:
$ getfacl Directory/
windows bash cygwin
chrisst
source share