I'm searching for a workaround for creating a folder which will be fully co-used with root and user including new subdirectories.
Example of usage:
I have an application which sometimes needs to run under root. The application has some global configuration files and project configuration files and some project files. While it is working the application can create, edit, delete files and create, edit, delete folders. I want to run the application after under user and not have any issues with permissions.
Are there any workarounds for a scenario like this?
Update:
All "duplicate answers" were not able to resolve my issue.
You still can't create subdirectories which will inherit permission rules.
I need to allow this scenario:
We have a shared folder called "test".
root:
mkdir dir1 // under test folder
cd dir1
touch file1
user:
cd test/dir1
rm file1