Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question
1  
Probably easiest is not to run as root. Otherwise it is the same as sharing any other directory / file with any other user with the exception of the security implications. In general, IMO , any files shared as root should be owned by root and ro by other users. See askubuntu.com/questions/291501/… –  bodhi.zazen May 2 at 22:53
    
I agree with You about security purposes, but due developing purposes You sometimes need open ports in root range ( < 1024) under IDE or some other priviledged actions. I found only one suitable scenario for me - always run under root, but IMO is more secureless then share several directories. –  Yulaw May 4 at 14:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.